Answer the question
In order to leave comments, you need to log in
How to substitute url in firefox bookmark button?
There is a tab bar in firefox, and I want to add a button with a link https://developers.google.com/speed/pagespeed/insi... url_address_of_active_tab - how to substitute the url of the active tab here?
Answer the question
In order to leave comments, you need to log in
When adding a bookmark, specify the following code instead of a link (the "Address" field):
javascript:(function(){
let link = 'https://developers.google.com/speed/pagespeed/insights/?url=' + encodeURIComponent(window.location.href);
Object.assign(document.createElement('a'), { target: '_blank', href: link}).click();
})()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question