Skip to content

Instantly share code, notes, and snippets.

@jakl
Created June 6, 2013 07:33
Show Gist options
  • Save jakl/5719913 to your computer and use it in GitHub Desktop.
Save jakl/5719913 to your computer and use it in GitHub Desktop.
TamperMonkey Imo.im
// ==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)
@jakl
Copy link
Author

jakl commented Jun 6, 2013

To use this install tamper monkey
and install my imo.im script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment