If you just want to redirect via "Favorites" use this:
// Pega o link atual
var link = window.location.href;
// Redireciona para o site contendo o link
window.open("http://9xbuddy.com/download?url="+link);
Do the same as you asked to do, it will have the same result without any page or HTML being injected or created. ;)
Supposedly to support Favicon by creating such elements:
$('head').html("<link rel='image_src' href='https://9xbuddy.com/img/9xbuddy.jpg'><script>window.open('http://9xbuddy.com/download?url='+window.location.href, '_self');</script>");
In this case it is necessary to load JQuery, this will result in:
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="https://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){$('head').html("<linkrel='image_src'href='https://9xbuddy.com/img/9xbuddy.jpg'><script>window.open('http://9xbuddy.com/download?url='+window.location.href,'_self');</script>");});
- None of the three options presented Favion in the browser tested, but the last one mentioned here behaves similarly, I do not know to what extent it is sufficient.