a-digital / cookie-consent-banner

Add a configurable cookie consent banner to the website.
MIT License
11 stars 13 forks source link

Learn More link is always target="_blank" #11

Closed ryanmasuga closed 5 years ago

ryanmasuga commented 5 years ago

Is it possible to set the Learn More link so that it does not use target="_blank"? In our case we're linking to a privacy policy that exists on the same site the visitor is currently on, so there is really no need to open a new window.

Might make for a flexible option in the control panel - whether the Learn More opens in new window or not.

mark-adigital commented 5 years ago

Basically, because the JS library which the plugin uses defaults to _blank and doesn't support the link open behaviour as a setting - I could add it but it will mean adding a new conditional to the core JS file, which may at some point need to be updated.

ryanmasuga commented 5 years ago

I can remove that from the minified JS, but that change will keep getting blown away if you ever other wise update this plugin, or we blow away our vendor folder and composer install again, getting fresh copies of everything.

Client really does not want the link opening an unnecessary window. I can almost work around this by putting a verbose looking link in the Message field:

This website uses cookies! 
<a style="color: #fff;text-decoration:underline;" href="/privacy-policy">Learn More</a>

However, I cannot leave the Learn More Link or Learn More Text fields blank.

Actually that doesn't work either. It does allow me to save, putting a link in the message, but then the banner fails to appear.

Guess we could write even more Javascript to remove target="_blank" from the link with class "cc-link"? Seems kludgy!

ryanmasuga commented 5 years ago

In our case, ended up skipping a CMS plugin altogether and going with https://cookieinfoscript.com/

Though for anyone wanting to do a CMS plugin, a few more options on this plugin would be welcome!

aarmitage commented 5 years ago

Hey Ryan,

There are a few plugin alternatives in the Craft Plugin Store which are more comprehensive in terms of GDPR etc., so at this stage, we hadn't really thought of developing ours much further.

That said, I've just had a quick look and I can see our plugin is now being used on over 700 sites which is far more than any of the others. On this basis, and given that we're updating our own site at the moment, we may (can't promise) look at adding in some new functionality here.

Cheers, Andrew

--- original message --- On July 31, 2019, 5:58 PM GMT+1 notifications@github.com wrote:

In our case, ended up skipping a CMS plugin altogether and going with https://cookieinfoscript.com/

Though for anyone wanting to do a CMS plugin, a few more options on this plugin would be welcome!

You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or mute the thread. --- end of original message --- -- If you've received this email by mistake, we're sorry for bothering you. It may contain information that's confidential, so please delete it without sharing it. And, if you let us know, we can try and stop it from happening again.

A Digital Ltd is registered in England and Wales. Registered Address: Suite 3 Unit 2 Meadowbank Business Park, Shap Road, Kendal, Cumbria, LA9 6NY. Company No. 7041426. VAT Registration No. 924 1361 47. Prices where quoted are exclusive of VAT.