Anandtech Link Rewriter

By chris feldmann Last update Jun 19, 2005 — Installed 1,146 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 2 posts, 2 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Rami User

Great script, very useful for me, But ... some anandtech articles use a double folder /folder/subfolder/showdoc.aspx, so i modified your script to coop with these links by using this regexp:

for (var j = 0; j < a.snapshotLength; j++) {
link = a.snapshotItem(j);
href = link.href;
if (href = href.replace(/com\/(\w+\/)+showdoc/gi, 'com/printarticle')){
link.href = href;
}

}

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