]> git.mxchange.org Git - friendica-addons.git/commitdiff
cookienotice addon - fixes for changerequest #pullrequestreview-195527901
authorPeter Liebetrau <peter.liebetrau@gmail.com>
Wed, 23 Jan 2019 15:01:28 +0000 (16:01 +0100)
committerPeter Liebetrau <peter.liebetrau@gmail.com>
Wed, 23 Jan 2019 15:01:28 +0000 (16:01 +0100)
cookienotice/cookienotice.js
cookienotice/cookienotice.php

index c92e8c2102ed007a882e63aeaa522f61e6547fee..0ab06c6658bb8d7dcfea3acb64b03acfde5956d4 100644 (file)
@@ -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';
                };
index 8551446831670d936dc55fed74fa9065d51dd2a0..376de1ada904e2a322034b2e2401dfdc014e8061 100644 (file)
@@ -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');
 }
 
 /**