Bookmarklet should work but isn't

The bookmarklet has this code:

javascript:var s=document.createElement('script');
s.type='text/javascript';
s.src='http://php-experiments-2.glitch.me/jslib/eval2.js';
document.body.appendChild(s);
void(0);

And it’s supposed to get the code from [site]/jslib/eval2.js and run that code on the site but it doesn’t work on other sites other than php-experiments-2.glitch.me.

Have you tried changing the link up there?

2 Likes

It works when i do https instead of http!

Glad to know I helped!

What does void(0) do?
Also, try wrapping this in a self-invoking anon function to avoid variable conflicts.

(()=> {
//your code here
})()