Created
February 25, 2012 20:53
-
-
Save ku/1910676 to your computer and use it in GitHub Desktop.
nengapoke
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
| var a=null;;$x("//ul/li//a/@data-profileid").filter(function (n) {return /*n.nodeValue == ""*/ true} ).map(function(n){ | |
| var profile_id = n.nodeValue; | |
| if (a) document.body.removeChild(a) | |
| a = document.createElement("a"); | |
| a.id = "pb-" + profile_id; | |
| a.setAttribute("ajaxify", '/ajax/pokes/poke_inline.php?uid=' + profile_id + '&name=dummy'); | |
| a.setAttribute("rel", "async-post"); | |
| a.appendChild( document.createTextNode("Poke")); | |
| document.body.appendChild(a); | |
| var evt = document.createEvent("MouseEvents"); | |
| evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
| a.dispatchEvent(evt); | |
| return profile_id | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment