cookienotice addon - fixes for changerequest #pullrequestreview-195527901

pull/794/head
Peter Liebetrau 2019-01-23 16:01:28 +01:00
parent 0d8a382f8d
commit 174828070f
2 changed files with 8 additions and 11 deletions

View 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';
};

View 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');
}
/**