Omnimaga

Omnimaga => Site Feedback and Questions => Topic started by: Deep Toaster on August 31, 2011, 10:56:57 am

Title: OURL- and cemete.ch- and ti-pla.net-shortening bookmarklet
Post by: Deep Toaster on August 31, 2011, 10:56:57 am
Code: [Select]
javascript:if((h=location.host).indexOf('omnimaga.org')+1){if(i=/topic=(\d+)/.exec(h=location.href)){i='http://ourl.ca/'+i[1];if(h=/msg(\d+)/.exec(location.search))i+='/'+h[1];prompt('',i+'/')}}else{i=[];i['cemetech.net']='cemete.ch';i['tiplanet.org']='ti-pla.net';if(i=i[h.slice((h.indexOf('www.')==0)*4)]){if(h=/(\w)=(\d+)$/.exec(location.search))prompt('','http://'+i+'/'+h[1]+h[2]+location.hash)}}void(0)
Save that as a bookmark, then use it on any thread here or any page on Cemetech for instant URL shortening.
Title: Re: OmniURL- and cemete.ch-shortening bookmarklet
Post by: DJ Omnimaga on August 31, 2011, 02:12:28 pm
I would advise against any script that does that with OmniURL automatically on every single page, though, because often, Dot.tk is down or unresponsive, unlike cemete.ch.
Title: Re: OmniURL- and cemete.ch-shortening bookmarklet
Post by: Deep Toaster on August 31, 2011, 03:00:32 pm
Oh, that's a good point :/ Oh well. I'll use it as a bookmark for myself.
Title: Re: OmniURL- and cemete.ch-shortening bookmarklet
Post by: Deep Toaster on May 19, 2012, 04:27:22 pm
Updated to use OURL.ca, among other changes.
Title: Re: OURL- and cemete.ch-shortening bookmarklet
Post by: DJ Omnimaga on May 19, 2012, 10:39:40 pm
It would be nice in the future if on the site, there was an extra ezblock somewhere at the bottom of every page that automatically generated a short Omni URL of the page you are on. It could be a text area with a copy to clipboard button or link, with a link below to try it.
Title: Re: OURL- and cemete.ch-shortening bookmarklet
Post by: Sorunome on May 20, 2012, 08:51:14 am
Also for each post, that somewhere in that post thingy is also the button for the short URL :)
Title: Re: OURL- and cemete.ch-shortening bookmarklet
Post by: Deep Toaster on May 20, 2012, 11:07:30 am
Updated again to support TI-Planet's ti-pla.net :)

EDIT: Updated yet again to fix some bugs.
Title: Re: OURL- and cemete.ch- and ti-pla.net-shortening bookmarklet
Post by: Adriweb on May 20, 2012, 11:51:10 am
nice, thanks :)

edit :

http://tiplanet.org/forum/archives_voir.php?id=4477

gets as : http://ti-pla.net/d4477

instead of  http://ti-pla.net/a4477

but looking at the code, it's only because it's not done :P
Title: Re: OURL- and cemete.ch- and ti-pla.net-shortening bookmarklet
Post by: Deep Toaster on May 20, 2012, 02:07:58 pm
Yeah, right now it only supports forums, topics, and posts. I might add more later.