Platform Racing 3 Antilag!
Here's a little trick I made to get rid of the lag from the Sparkworkz page! No more playing fullscreen with the game size waaaay too big...
The Code
Directions:
- Create a new favorite (Internet Explorer) or bookmark (most other browsers) with this text as the address:
Code:javascript:pr3 = {ver: "4.2",debugPoint: 0,url: 'http://jiggmin.com/forum/showthread.php?t=47962',err: '',done: false};function _$_(id) {return document.getElementById(id);}function mark() {++pr3.debugPoint;}function tear() {pr3.debugPoint += 0.01;}function checkIfNull(obj) {if (pr3.done) {alert('Broseph, you already de-lagified everything.');throw "pr3"} else if (obj == null) {if (window.location.href.search(/^http:\/\/(www\.)?sparkworkz\.com\//) != -1 && window.location.href != 'about:blank') alert("It looks like everything didn't load before you clicked the script.\n\nWait a bit and try again.");else alert("You aren't even on Sparkworkz!");throw "pr3"}}function markObj(obj) {mark();checkIfNull(obj);return obj;}function removeObj(obj) {markObj(obj).parentNode.removeChild(obj);}(function (debug) {try {var crap = [_$_('banner1'), _$_('ad'), _$_('mainAd'), _$_('randomGameDragon')];var iTunesLink;if ((iTunesLink = markObj(_$_('wrap')).getElementsByTagName('a')[0])) crap.push(iTunesLink);for (var i in crap) {if (debug)alert('removing crap[' + i + ']');removeObj(crap[i]);}loadFlash();document.title += ' with antilag v ' + pr3.ver;} catch (e) {if (e != "pr3") {pr3.err = e.name + ': ' + e.message + ' $' + pr3.ver + '@' + pr3.debugPoint + '<' + window.navigator.userAgent + '>';alert('Uh oh... there was an error!\n\n' + pr3.err);if (confirm("Would you like to report this error?\nNote: This will open a new window in your browser.")) {if (prompt("Please copy the error message below. You will need to post the error in the PR3 Antilag thread.\n\nWould you like to close this game too?", pr3.err)) window.location.href = pr3.url;else {window.open(pr3.url, "pr3")}}}}})(false);- Name it "PR3 antilag".
- Go to the Sparkworkz PR3 page and click the bookmark to activate the antilag. Have fun!
Note: If you have the old antilag, then delete the old one before making the new one.
Making a bookmark/favorite
I see some people are having trouble making a new bookmark/favorite, so here are some instructions. After you open the new bookmark/favorite window using the instructions below, read "The Code" above.
Firefox:
- At the top of the Firefox window, click "Bookmarks".
- Right-click anywhere in the menu.
- In the popup menu, click "New Bookmark...".
Opera:
- While in Opera, hit Ctrl+Shift+B or go to Opera Menu > Bookmarks > Manage Bookmarks...
- Right-click on any bookmark.
- In the popup menu, click "New Bookmark".
Google Chrome:
- While in Google Chrome, hit Shift+Ctrl+B or click the wrench icon on the top-right of the window and click Bookmark Manager.
- Right-click inside the Bookmark Manager and click "Add Page...". Note that you can also right click on the Bookmarks toolbar to get this menu up.
Internet Explorer:
Changelog
Version 4.2.1
- Added some extra checks to handle when everything isn't loaded on the Sparkworkz page.
- The last update broke the "You aren't even on Sparkworkz!" error message and that's been fixed.
Version 4.2
- Removed that link to the iTunes store for PR3 that's screwing the layout up. It's on the server menu of PR3 anyway.
- Took out some code that isn't useful anymore.
- The title reflects what version of PR3 Antilag you're using.
Version 4.1.1
- I forgot a piece of error checking when removing the Mochi Awards button. Whoopsie!
Version 4.1
- I refactored the code a bit. You should experience less unnecessary error messages (like, for example, an error that wasn't prevented that concerns all the elements not being loaded yet).
- I nominated the Mochi Awards button for "far too annoying and distracting to stay at the bottom of the page". Nominate that, you son of a...
Version 4
- Fixed a bug in checking if you're on Sparkworkz.
- Updated script to work with the new Sparkworkz layout.
- No more waiting for the "Skip Ad" link to show up!
- The title of the webpage now reflects that antilag is on.
- Minor update: The random game dragon has been slain.
- Minor update: I keep forgetting to update what the code says the version of the script is. DURR
Version 3.2
- New error-handling code. Some error messages now have more clarification. New code to send error messages when something terrifying happens.
Version 3
- Using a different method to remove <div>s.
- A bit of debugging code has been added. If something catastrophic happens, then it'll give you an error message and allow you to post it to this thread.
Version 2
- The code is cleaner.
- The code now removes the header with the logo in it to clean up the page a bit.
Version 1
- Original version.



Reply With Quote





GO SEAHAWKS

