Note that there are some explanatory texts on larger screens.

plurals
  1. POPlease check my Javascript Snippet. It's a greasemonkey script for FB Mobwars
    text
    copied!<p>Hey guys, I'm practising my Javascript programming by developing greasemonkey scripts, theoretically it would improve my javascript coding cause it's raw javascript.</p> <p>So now, im coding a script for Mobwars facebook. It's a game where you kill people, steal stuffs, create mobs, etc etc.</p> <p>To understand this better, here's the screenie of the page:</p> <p><a href="http://www.picamatic.com/show/2009/03/18/08/11/2877480_703x486.png" rel="nofollow noreferrer">alt text http://www.picamatic.com/show/2009/03/18/08/11/2877480_703x486.png</a> What I'm trying to do is to scan the page, and get the Name of the job and display it to the user.</p> <p>I want to get the text Mugging, House Burglary, Stoplight Car Theft etc etc</p> <p>The text have a color property which is set to silver.</p> <p>Look at my code, I tried it in Firebug but it doesn't even alerted..</p> <pre><code>var jobs = {}; jobs.scan = function() { var tagHolder = {}; var availJobs = {}; var jobContents = dom.get("app8743457343_content"); var rData = dom.getElementsByClass(rowData, jobContents, "tr"); for(var i = 0; i &lt; rData.length; i++) { var rChildren = rData[i].childNodes; for(var j = 0; j &lt; rChildren.length; j++) { if(rChildren[j].tagName === "B") { tagHolder.push(rChildren[j]); } } for(var k = 0; k &lt; tagHolder.length; k++) { if (tagHolder[k].color == "silver") { availJobs.push(tagHolder[k].textContent); } } } return alert(availJobs[0]); } jobs.scan(); </code></pre> <p>Just tell me what's wrong with the code.. I'll just tweak this code and maybe if i managed to fix it, ill report it here again. Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload