Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
James Falkner
Linkification of text on liferay.com
9. Januar 2013 11:42
Antwort

James Falkner

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1229

Eintrittsdatum: 17. September 2010

Neue Beiträge

Do you use Chrome? Are you tired of having to cut and paste links from our forums or blog/wiki comment area into your browser so you can visit someone's link that didn't properly linkify it in the first place (or could not)? Can't wait for LPS-15491 to get included in Liferay? Well here's my quick and dirty fix - a Chrome plugin that will attempt to linkify non-link links on liferay.com!

Since this is so small and will probably get rejected from the Chrome Extension library, I thought I'd include it here in its infant form for those who want to give it a go.

Simply extract the attached zip file into some directory. Then, in Chrome:

1. Visit chrome://extensions
2. Click "Developer mode" (see screenshot)
3. Click "Load unpacked extension..."
4. Select the directory in which you extracted the plugin
5. Any visit to any *.liferay.com link will attempt to convert any un-linked things that appear to be links (including links to our open source issues database) to a real link.

Example text that will be converted to links:

http://site.net
http://somesite.com/somepage
https://securesite.org/goo.html
ftp://oldschool.com/file1.zip
www.lazycoder.com
LPS-12341 (will make a link to issues.liferay.com, same with the rest)
FACES-243
SOS-232
AUI-2343
IDE-23
MAVEN-12
SYNC-120

Enjoy, if you find bugs, let me know (and preferably post the fix here). And if you want to convert this to work with other browsers, go for it! It's pretty simple code.

I got the code from here and here.
Anhang

Anhänge: chrome-lil.png (26,4k), lil.zip (2,5k)
James Falkner
RE: Linkification of text on liferay.com
9. Januar 2013 12:36
Antwort

James Falkner

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1229

Eintrittsdatum: 17. September 2010

Neue Beiträge

BTW, I mistakingly left out the FACES project (sorry Neil!!). To fix this, edit the lil.js, at the bottom you'll see a list of Liferay projects - just add in FACES so the line reads

1new RegExp('\\b(' + "(LPS|AUI|IDE|SOS|MAVEN|SYNC|FACES)-[0-9]+" + ')\\b', 'gim'),