From: Peter Liebetrau Date: Wed, 23 Jan 2019 15:01:28 +0000 (+0100) Subject: cookienotice addon - fixes for changerequest #pullrequestreview-195527901 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=174828070f88a34e7fa7fbd550687cf970fece02;p=friendica-addons.git cookienotice addon - fixes for changerequest #pullrequestreview-195527901 --- diff --git a/cookienotice/cookienotice.js b/cookienotice/cookienotice.js index c92e8c21..0ab06c66 100644 --- a/cookienotice/cookienotice.js +++ b/cookienotice/cookienotice.js @@ -5,7 +5,6 @@ window.addEventListener("load", function () { if (cookie == "") { document.getElementById('cookienotice-box').style.display = 'block'; document.getElementById('cookienotice-ok-button').onclick = function () { - console.log('clicked'); setCookie(cookiename, 1, 365); document.getElementById('cookienotice-box').style.display = 'none'; }; diff --git a/cookienotice/cookienotice.php b/cookienotice/cookienotice.php index 85514468..376de1ad 100644 --- a/cookienotice/cookienotice.php +++ b/cookienotice/cookienotice.php @@ -20,11 +20,10 @@ use Friendica\Core\Renderer; */ function cookienotice_install() { - $file = 'addon/cookienotice/cookienotice.php'; - Hook::register('page_content_top', $file, 'cookienotice_page_content_top'); - Hook::register('page_end', $file, 'cookienotice_page_end'); - Hook::register('addon_settings', $file, 'cookienotice_addon_settings'); - Hook::register('addon_settings_post', $file, 'cookienotice_addon_settings_post'); + Hook::register('page_content_top', __FILE__, 'cookienotice_page_content_top'); + Hook::register('page_end', __FILE__, 'cookienotice_page_end'); + Hook::register('addon_settings', __FILE__, 'cookienotice_addon_settings'); + Hook::register('addon_settings_post', __FILE__, 'cookienotice_addon_settings_post'); } /** @@ -35,11 +34,10 @@ function cookienotice_install() */ function cookienotice_uninstall() { - $file = 'addon/cookienotice/cookienotice.php'; - Hook::unregister('page_content_top', $file, 'cookienotice_page_content_top'); - Hook::unregister('page_end', $file, 'cookienotice_page_end'); - Hook::unregister('addon_settings', $file, 'cookienotice_addon_settings'); - Hook::unregister('addon_settings_post', $file, 'cookienotice_addon_settings_post'); + Hook::unregister('page_content_top', __FILE__, 'cookienotice_page_content_top'); + Hook::unregister('page_end', __FILE__, 'cookienotice_page_end'); + Hook::unregister('addon_settings', __FILE__, 'cookienotice_addon_settings'); + Hook::unregister('addon_settings_post', __FILE__, 'cookienotice_addon_settings_post'); } /**