cursed javascript links (cant even see their output in the status-bar)

Subscribe to cursed javascript links (cant even see their output in the status-bar) 28 posts, 4 voices

sdfghjklkjhg... Scriptwright

does anyone know of a script that will allow me to open them in a new tab
i have tried several scripts to do this no success
on this page for example
http://www.gaiaonline.com/marketplace/mystore/s...
they are image javascript links i would like to be able to use them just like any other link like middle clicking them or right click open in new tab or just force them to open in a new tab every time

 
ekbworldwide Scriptwright

That link requires a log-in. And bugmenot doesn't work.

You could try this add-on...

Smart Middle Click
https://addons.mozilla.org/en-US/firefox/addon/...

...it might work.

 
sdfghjklkjhg... Scriptwright

tried it some time back did not work

 
sdfghjklkjhg... Scriptwright

i made an account so you can login in
username: "dam javascript links"
password: "172839456."
without quotes

 
ekbworldwide Scriptwright

username: dam javascript links
password: 172839456.

Note - session cookies are not accepted.

"dam(n)" - I know what you mean - javascript links can be annoying as hell.

Pre tags are good for giving a code sample or for making the font courier (which can make things clearer).

example of a javascript link

http://pastebin.mozilla.org/562896

I hope other people work on this too - I'm the opposite of a speed demon when it comes to programming.

---

By the way (I know this isn't what you want.) to open that image - or images at the site in a new tab...

on the image
- right-click (for the context menu)
- view image (middle click)

...you can do that for any "normal" image and at that site - at least on those small images - it works.

 
Avindra Gool... Scriptwright

Either set the target to _blank or use the GM_openInTab function.

 
ekbworldwide Scriptwright

He's asking for somebody to write the script - somebody like, I dunno... you...

---

edit

Also...

>> does anyone know of a script that will allow me to open them in a new tab

I think he wants the javascript links converted into plain links.

 
sdfghjklkjhg... Scriptwright

do you think you could modify http://userscripts.org/scripts/show/10555 to work on this
i much know mush about javascript though i figured out how to use it to apply css to a page but in all reality that is it
surprisingly i read your last post 1 minute after it was posted but that is besides the point

 
Avindra Gool... Scriptwright

worked on it a bit, if anyone wants to take it further, here it is:

// ==UserScript==
// @name           Gaia Online Link Rebuilder
// @namespace      #avg
// @description    Fixes links on gaia online
// @include        http://*gaiaonline.com/*
// ==/UserScript==
items=document.evaluate("//div[contains(@id,'sell_')]",document,null,6,null);
for(i=0;i<items.snapshotLength;i++) {
	var cur=items.snapshotItem(i);
	link=document.createElement("a");
	with(cur) {
	var temp=/'([^']+)/.exec(getAttribute("onclick")) || ["null","null"];
	link.href=temp[1];
	appendChild(link);
	removeAttribute("onclick");
	}
var temp=cur.firstChild.cloneNode(true);
cur.removeChild(cur.firstChild);
cur.firstChild.appendChild(temp);
}

going to do homework now

 
ekbworldwide Scriptwright

>> do you think you could modify ../10555

What you want requires much more.

That script is just a one line and it uses an unsafe method.

http://userscripts.org/scripts/review/10555

Also the scriptwright made Include all pages "*". Posting such a script that uses an unsafe method to be used everywhere is a horrible idea.

Anyway, I bet somebody else will take over from avg. The code is way over my head.

 
sdfghjklkjhg... Scriptwright

thanks that is the hard part that much i can tell unfortunately i don't know enough javascript to finish this script
i changed the run on pages to be more specific for the site

// ==UserScript==
// @name           Gaia Online Link Rebuilder
// @namespace      #avg
// @description    Fixes links on gaia online
// @include        http://*.gaiaonline.com/marketplace/mystore/showinventory/*
// @include        http://gaiaonline.com/marketplace/mystore/showinventory/*
// @exclude        http://*.gaiaonline.com/marketplace/mystore/showinventory/*/*
// @exclude        http://gaiaonline.com/marketplace/mystore/showinventory/*/*
// ==/UserScript==

 
sdfghjklkjhg... Scriptwright

can you possibly have it do this to the html code so it will work
with rebuild script
Before:

<div id="sell_1" class="inv_item_thumb" title="Green Flame Shirt">
<img height="30" width="30" border="0" src="http://s2.cdn.gaiaonline.com/images/thumbnails/228ed52f5.png" alt="Green Flame Shirt"> </img>
<a href="/marketplace/mystore/sell/?item_id=245&item_param=13954149&item_param2=1"/>
</div>

the needed effect
After:
<div id="sell_1" class="inv_item_thumb" title="Green Flame Shirt">
<a href="/marketplace/mystore/sell/?item_id=245&item_param=13954149&item_param2=1"/>
<img height="30" width="30" border="0" src="http://s2.cdn.gaiaonline.com/images/thumbnails/228ed52f5.png" alt="Green Flame Shirt"> </img>
</div>

notice the link comes before the image in the code

 
sdfghjklkjhg... Scriptwright

come on for peat sakes i cant display the html code :(
just found the edit post button, lol
if there was only a delete post button
finally got it right i'm such a blind bat
just found a delete post button

 
ekbworldwide Scriptwright

If you want to post something that gets wrecked by the pre tags you can post it mozilla's pastebin

http://pastebin.mozilla.org/

 
JoeSimmons Scriptwright

If you want to post something that gets wrecked by the pre tags you can post it mozilla's pastebin

http://userscripts.org/scripts/show/34094

 
sdfghjklkjhg... Scriptwright

since it took me so long to find the edit post and delete post links i made
http://userscripts.org/scripts/show/36241

 
sdfghjklkjhg... Scriptwright

would somebody please finish that script that was started by avg
that or a way to always make it open in a new tab please

 
Avindra Gool... Scriptwright

oh if you just want new tab, this should work:

// ==UserScript==
// @name           Gaia Online Link Rebuilder
// @namespace      #avg
// @description    Fixes links on gaia online
// @include        http://*gaiaonline.com/*
// ==/UserScript==
items=document.evaluate("//div[contains(@id,'sell_')]",document,null,6,null);
for(i=0;i<items.snapshotLength;i++)
	with(items.snapshotItem(i)) {
		var link=((getAttribute("onclick")||"null").match(/'[^;]+/)||[""])[0];
		setAttribute("onclick","window.open("+link+")");
	}

 
sdfghjklkjhg... Scriptwright

it has no effect for some reason
ps i changed it to window.open using firebug i clicked it, it did nothing

 
Avindra Gool... Scriptwright

window.open should've worked....

try this:

// ==UserScript==
// @name           Gaia Online Link Rebuilder
// @namespace      #avg
// @description    Fixes links on gaia online
// @include        http://*gaiaonline.com/*
// ==/UserScript==
items=document.evaluate("//div[contains(@id,'sell_')]",document,null,6,null);
for(i=0;i<items.snapshotLength;i++)
	with(items.snapshotItem(i)) {
		var link=((getAttribute("onclick")||"null").match(/'([^;]+)/)||["",""])[1];
		removeAttribute("onclick");
		onclick=null;
		addEventListener("click",function(){GM_openInTab(document.domain+link)},false);
	}

 
sdfghjklkjhg... Scriptwright

no effect the html reads window.location
http://pastebin.mozilla.org/565054

 
Avindra Gool... Scriptwright

LOL

Did you even install the script then? Right click on the monkey and check that it's running on the page. Try it out for both scripts, because I tested them, and they're definitely working.

 
sdfghjklkjhg... Scriptwright

// ==UserScript==
// @name           Gaia Online Link Rebuilder
// @namespace      #avg
// @description    Fixes links on gaia online
// @include        *
// ==/UserScript==
items=document.evaluate("//div[contains(@id,'sell_')]",document,null,6,null);
for(i=0;i<items.snapshotLength;i++)
	with(items.snapshotItem(i)) {
		var link=((getAttribute("onclick")||"null").match(/'([^;]+)/)||["",""])[1];
		removeAttribute("onclick");
		onclick=null;
		addEventListener("click",function(){GM_openInTab(document.domain+link)},false);
	}

refusing to show full code so...
http://pastebin.mozilla.org/565062
it opened in same tab
i am using tab mix plus if that could effect it single window mode is on
it is enabled i reinstalled it just to be safe
using noscript,addblockplus also
javascript is enabled
greasemonkey 8.200...
firefox 3.03

 
Avindra Gool... Scriptwright

ill check it out later. as for typing in code, where there's a < inside your code's <pre> tags, type &lt; instead.

Or, you can install my modified version of alien_scum's script, whose code is here: http://pastebin.ca/1230822 .

 
sdfghjklkjhg... Scriptwright

if you get board
comment by sdfghjklkjhg...
would that be possible know that will work

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel