Recent posts by Rommel

Subscribe to Recent posts by Rommel 8 posts found

Jan 28, 2008
Rommel 8 posts

Topic: Ideas and script requests / [Request] Filefront download link rewriter

Is it ok to host this?

// ==UserScript==
// @author        Descriptor
// @name          Filefront Link Rewriter
// @description   Rewrites filefront download links to shorthand version
// @include       *
// ==/UserScript==
var ff_fileLinks = document.evaluate("//a[starts-with(@href, 'http://files.filefront.com/')]", document, null, 6, null);
for(var i=0, flink; ff_fileLinks.snapshotLength > i; i++){
  flink = ff_fileLinks.snapshotItem(i).href.match(/(http:\/\/[^\/]+\/)[^\/]+\/;(\d+);\/.*/);
  ff_fileLinks.snapshotItem(i).href = flink[1] + flink[2];
}

 
Jan 27, 2008
Rommel 8 posts

Topic: Ideas and script requests / [Request] Filefront download link rewriter

It's perfect!!
Thank you so much!!

-Rommel

 
Jan 27, 2008
Rommel 8 posts

Topic: Ideas and script requests / [Request] Filefront download link rewriter

Not exactly what I meant but close, I'll try messing with the code to suit my needs if you/somebody hasn't replied by the time I get to it.

What I meant was lets say if you goto my filefront page, there is a list of files I have hosted, they all have the long url not the short. The reason I want them to have the short is because I use the firefox extension CoLt, so when I see filefront links I want to link I right click copy link using colt which then auto add's the bbcode tags.

 
Jan 27, 2008
Rommel 8 posts

Topic: Ideas and script requests / [Request] Filefront download link rewriter

Can somebody make a simple script for me that rewrites any filefront download link found into the shorthand filefront link.

Example of a filefront link:
http://files.filefront.com/rommel+a720iszip/;95...

Example of the shorthand version:
http://files.filefront.com/9516377

This doesn't have to work on all sites, I'd be happy with it just working on filefront only. The main reason I want it is when I goto link files from filefront on forums the ; in the long version break bbcode so I have to manually edit the link which becomes tedious.

Thank you to who ever gets it done.

-Rommel

 
Jan 5, 2008
Rommel 8 posts

Topic: Ideas and script requests / I need help urgently!!

I changed the title as I haven't gotten one response in 3 days.

Can someone add a GM_xmlhttpRequest section to this script PLEASE

I have edited the Blockbuster.com Links in IMDb
to instead add links to the Cobb Library Catalog (Script).

What I would like to have added though is a GM_xmlhttpRequest section that checks the library search page to see if it found a match. If it finds a match it creates the link, if not it doesn't.

What I know...
If a search finds a match one of these strings will be in the page source,
'State #4'
'State #5'
So the request looks for 'state #' if the next character is <=5 it displays the link.

If a search does not find a match this string will be in the page source,
'State #9'

I have spent several hours trying to do this myself but it is beyond my current abilities.
Any and all help is greatly appreciated.
 
Feb 24, 2007
Rommel 8 posts

Topic: Ideas and script requests / Scritp Request: Highlight link text based on url

Found a script somewhere on the greasemonkey site that used in conjunction with this is pretty nice.

function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}

addGlobalStyle('A[href*="forums"]{color:blue !important;}');

 
Feb 24, 2007
Rommel 8 posts

Topic: Ideas and script requests / Scritp Request: Highlight link text based on url

BTW, Case closed.
A friend wrote me a 12 line script that doe what I wanted.
I'm gonna try your version though also.

 
Feb 23, 2007
Rommel 8 posts

Topic: Ideas and script requests / Scritp Request: Highlight link text based on url

There is a script that will highlight links based on words but what I need is one that highlights based on matching part of the url.

[url=http://userscripts.org/scripts/show/1478]Highlight certain links[/url]