Created
June 6, 2013 07:33
-
-
Save jakl/5719913 to your computer and use it in GitHub Desktop.
TamperMonkey Imo.im
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 Add space for double click highlight in imo.im | |
// @namespace http://imo.im | |
// @version 0.1 | |
// @description add a space before imo.im posts so double click highlight is functional | |
// @match https://imo.im | |
// @copyright 2012+, @jakl | |
// ==/UserScript== | |
setTimeout(function(){ | |
(new WebKitMutationObserver( | |
function(m){ | |
m.forEach( | |
function(mutation){ | |
for(var i = 0; i < mutation.addedNodes.length; i++) { | |
try{ | |
var mut = mutation.addedNodes[i]; | |
if(mut.attributes.class.nodeValue.indexOf('convlogitem') !== -1){ | |
var node = mut.getElementsByClassName(' ms')[0]; | |
node.innerHTML = ' ' + node.innerHTML; | |
} | |
} catch(e){} | |
} | |
} | |
) | |
} | |
)).observe( | |
document.getElementsByClassName(' content')[0] | |
, {childList: true, subtree: true} | |
) | |
}, 4000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use this install tamper monkey
and install my imo.im script