NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name JVC Shortcut Repair // @version 1.0 // @description // @author Crafbukkit // @require http://code.jquery.com/jquery-2.2.0.min.js // @match http://www.jeuxvideo.com/forums/0-* // @match http://www.jeuxvideo.com/forums/42-* // @match http://www.jeuxvideo.com/forums/1-* // @grant none // ==/UserScript== function repair() { setTimeout(repair, 500); for(var k=0;k<document.getElementsByClassName("f-stkr-w").length;k++) { document.getElementsByClassName("f-stkr-w")[k].getElementsByTagName("img")[0].onclick = function(){ document.getElementsByName("message_topic")[0].value += "[[sticker:p"+ this.src.split('/p')[1].split('?')[0] + "]]"; setTimeout(function(){document.getElementsByName("message_topic")[0].value=document.getElementsByName("message_topic")[0].value.split('[[sticker:undefined]]').join('');}, 100); return false; }; } document.getElementsByName("message_topic")[0].value=document.getElementsByName("message_topic")[0].value.split('[[sticker:undefined]]').join(''); } setTimeout(repair, 2000);