Skip to content

Instantly share code, notes, and snippets.

@jaromero
Created July 14, 2012 01:14
Show Gist options
  • Save jaromero/3108638 to your computer and use it in GitHub Desktop.
Save jaromero/3108638 to your computer and use it in GitHub Desktop.
TVTropes spoiler title killer GM script
// ==UserScript==
// @name TVTropes spoiler title
// @namespace http://gm.nsdragon.net/
// @version 0.1
// @description Kills title attributes on spoilers so they don't get in the way
// @match http://*.tvtropes.org/*
// @match http://tvtropes.org/*
// @copyright 2012+, https://github.com/jaromero
// @license Public Domain
// @downloadURL https://gist.github.com/raw/3108638/tvtropes-kill-title.user.js
// @updateURL https://gist.github.com/raw/3108638/tvtropes-kill-title.user.js
// ==/UserScript==
(function () {
var f = Array.prototype.forEach;
var s = document.querySelectorAll('span.spoiler'); // NodeList, not Array
// Iterate over the NodeList s, each element is e
f.call(s, function(e) {
e.title = '';
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment