Ero sivun ”Koodilistaus:URL in Tooltip.js” versioiden välillä
(Ak: Uusi sivu: <metadesc content="A Greasemonkey JS snippet to show the URL of links in tooltips" /> '''Download:''' [{{#file: URL in Tooltip.js}} <code>URL in Tooltip.js</code>] This is a Greasemo…) |
p (Tekstin korvaus – ”<metadesc content="([^"]*)" \/>” muotoon ”<metadesc>$1</metadesc>”) |
||
Rivi 1: | Rivi 1: | ||
<metadesc | <metadesc>A Greasemonkey JS snippet to show the URL of links in tooltips</metadesc> | ||
'''Download:''' [{{#file: URL in Tooltip.js}} <code>URL in Tooltip.js</code>] | '''Download:''' [{{#file: URL in Tooltip.js}} <code>URL in Tooltip.js</code>] | ||
Versio 9. marraskuuta 2011 kello 20.52
<metadesc>A Greasemonkey JS snippet to show the URL of links in tooltips</metadesc>
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); } })()