Bookmarklet not working

Ask for help about NoScript, no registration needed to post
theArchitektas
Posts: 2
Joined: Sun Jan 05, 2014 4:24 pm

Bookmarklet not working

Post by theArchitektas »

Okay, I have a bookmark with this JS:

Code: Select all

javascript:(function(){document.body.appendChild(document.createElement("script")).src="//raw.github.com/Azeirah/azeirah.github.io/master/groovemarklet2.js"})()
It's for extracting song info from sites like Pandora, Grooveshark, you name it.

Thing is, it doesn't work with NoScript enabled:

Code: Select all

[NoScript] Blocking nosniff Javascript served from https://raw.github.com/Azeirah/azeirah.github.io/master/groovemarklet2.js with wrong type info text/plain, inline and included by http://grooveshark.com/
Setting the noscript.nosniff to false and retrying throws this:

Code: Select all

[NoScript] Blocking cross-site Javascript served from https://raw.github.com/Azeirah/azeirah.github.io/master/groovemarklet2.js with wrong type info text/plain, inline and included by http://grooveshark.com/
Any help would be appreciated.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:24.0) Gecko/20131208 Firefox/24.0 PaleMoon/24.2.2
barbaz
Senior Member
Posts: 11163
Joined: Sat Aug 03, 2013 5:45 pm

Re: Bookmarklet not working

Post by barbaz »

theArchitektas wrote:Setting the noscript.nosniff to false and retrying throws this:

Code: Select all

[NoScript] Blocking cross-site Javascript served from https://raw.github.com/Azeirah/azeirah.github.io/master/groovemarklet2.js with wrong type info text/plain, inline and included by http://grooveshark.com/
Well, I think you can try to "fix" this one by adding

Code: Select all

https://raw.github.com/Azeirah/azeirah.github.io/master/
to noscript.inclusionTypeChecking.exceptions in about:config.
I have no idea about the nosniff error though :?:
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20100101 Firefox/17.0
theArchitektas
Posts: 2
Joined: Sun Jan 05, 2014 4:24 pm

Re: Bookmarklet not working

Post by theArchitektas »

Heh, looks like that fixed the problem, even nosniff can be set to true now. Thanks.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:24.0) Gecko/20131208 Firefox/24.0 PaleMoon/24.2.2
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Bookmarklet not working

Post by Thrawn »

The reason for this is that Github is correctly telling your browser that you're not meant to do this, that the file is supposed to be downloaded, not included in the page.

And since you don't know what someone is going to commit to Github, this isn't really safe.

You'd be better off downloading the whole script and copying it into your bookmarklet.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Post Reply