Ero sivun ”Koodilistaus:URL in Tooltip.js” versioiden välillä
p (Tekstin korvaus – ”<metadesc content="([^"]*)" \/>” muotoon ”<metadesc>$1</metadesc>”) |
p (Tekstin korvaus – ”<metadesc>(.*)<\/metadesc>” muotoon ”{{#description2:$1}}”) |
||
Rivi 1: | Rivi 1: | ||
{{#description2:A Greasemonkey JS snippet to show the URL of links in tooltips}} | |||
'''Download:''' [{{#file: URL in Tooltip.js}} <code>URL in Tooltip.js</code>] | '''Download:''' [{{#file: URL in Tooltip.js}} <code>URL in Tooltip.js</code>] | ||
Nykyinen versio 6. tammikuuta 2021 kello 15.35
Download: [{{#file: URL in Tooltip.js}} URL in Tooltip.js
]
This is a Greasemonkey JS snippet to show the URL of links in tooltips (instead of what's set by the title attribute). I take no credit for this, as I just c&p'd it from a thread over at Mozilla forums.
{{#fileanchor: URL in Tooltip.js}}
// ==UserScript== // @name URL in Tooltip // @namespace mariginari // @description Show link url in tooltip // @include http* // ==/UserScript== (function(){ var e=document.getElementsByTagName('a'); for(var i=0;e[i];i++){ e[i].setAttribute('title',e[i].href); } })()