From 526389b2d380177490605037fdc3a24ebc688fac Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 2 Dec 2018 20:56:30 +0300 Subject: update notify_* calls to use Notify --- plugins/nsfw/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/nsfw') diff --git a/plugins/nsfw/init.php b/plugins/nsfw/init.php index 6a1ae3c65..53b9ee479 100644 --- a/plugins/nsfw/init.php +++ b/plugins/nsfw/init.php @@ -63,7 +63,7 @@ class NSFW extends Plugin { new Ajax.Request('backend.php', { parameters: dojo.objectToQuery(this.getValues()), onComplete: function(transport) { - notify_info(transport.responseText); + Notify.info(transport.responseText); } }); //this.reset(); -- cgit v1.2.3 From 71fc6d45bd761a9d2715faa68f2b8c0271ee7169 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 3 Dec 2018 13:38:13 +0300 Subject: refactor error reporting to AppBase; keep exception_error() for now as a shim --- plugins/nsfw/init.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/nsfw') diff --git a/plugins/nsfw/init.js b/plugins/nsfw/init.js index 40ad2b0ba..adb6d43c0 100644 --- a/plugins/nsfw/init.js +++ b/plugins/nsfw/init.js @@ -1,12 +1,7 @@ function nsfwShow(elem) { - try { - content = elem.parentNode.getElementsBySelector("div.nswf.content")[0]; + let content = elem.parentNode.getElementsBySelector("div.nswf.content")[0]; - if (content) { - Element.toggle(content); - } - - } catch (e) { - exception_error("nswfSHow", e); + if (content) { + Element.toggle(content); } } -- cgit v1.2.3