Last active
December 18, 2015 23:51
-
-
Save Tiny-Giant/6059a2bdfb493ab0e6e4 to your computer and use it in GitHub Desktop.
Sets the title for every link as the URL for every link on the page which does not already have a title.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SE URL To Title | |
// @namespace http://github.com/Tiny-Giant | |
// @version 1.0.0.1 | |
// @description Sets the title for every link as the URL for every link on the page which does not already have a title. | |
// @author @TinyGiant | |
// @include /^https?:\/\/.*\.?stack(overflow|exchange).com/.*$/ | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ | |
window.addEventListener('load',function() { | |
'use strict'; | |
var links = document.querySelectorAll('a'), i; | |
for (i in Object.keys(links)) if(!links[i].title) links[i].title = links[i].href; | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment