J!Extensions Store™
Forum
Welcome, Guest
Please Login to access forum.
Accept cookies clicking on the blocked placeholder text (2 viewing) 
Go to bottom
TOPIC: Accept cookies clicking on the blocked placeholder text
#7957
John Dagelmore
Admin
Posts: 3520
User Offline
Accept cookies clicking on the blocked placeholder text 2 Months, 2 Weeks ago Karma: 74  
It's possible to accept cookies clicking on the text reporting a resource as blocked, this requires some custom javascript as below:

Code:

function insert_GDPRAcceptBtn_in_Placeholdertext() { $placeHolders = jQuery("div.gdprlock-placeholder-text"); $placeHolders.each(function(){ placeHolderContent = jQuery(this).html(); jQuery(this).html(placeHolderContent.replace('<button>','<button onclick="jQuery(\'a.cc-allow\').trigger(\'click\');">')); }); }
Code:

jQuery(window).on('load', function() { insert_GDPRAcceptBtn_in_Placeholdertext(); });
 
Logged Logged  
 
Last Edit: 2019/08/31 21:24 By @store$eco#mm!.
  The administrator has disabled public write access.
Go to top