From 668b0ac7a675c0ea49e4223d716cc1db0e64056c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 10 Mar 2021 16:34:27 +0300 Subject: [PATCH] shorten_expanded: no need to hook on HOOK_SANITIZE anymore --- plugins/shorten_expanded/init.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/plugins/shorten_expanded/init.php b/plugins/shorten_expanded/init.php index 9673f581b..c097f1a0d 100644 --- a/plugins/shorten_expanded/init.php +++ b/plugins/shorten_expanded/init.php @@ -10,22 +10,6 @@ class Shorten_Expanded extends Plugin { function init($host) { $this->host = $host; - - $host->add_hook($host::HOOK_SANITIZE, $this); - } - - // native lazy loading messes with plugin height calculation because images get loaded - // after headline is actually rendered (off screen) so we force disable it - function hook_sanitize($doc) { - $xpath = new DOMXPath($doc); - - $entries = $xpath->query('(//*[@loading="lazy"])'); - - foreach ($entries as $entry) { - $entry->removeAttribute("loading"); - } - - return $doc; } function get_css() {