フォーラム

ホーム » Liferay Portal » English » A. Liferay's Community » General

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
James Falkner
Linkification of text on liferay.com
2013/01/09 11:42
答え

James Falkner

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1222

参加年月日: 2010/09/17

最近の投稿

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.
画像の固定

添付ファイル: chrome-lil.png (26.4k), lil.zip (2.5k)
James Falkner
RE: Linkification of text on liferay.com
2013/01/09 12:36
答え

James Falkner

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1222

参加年月日: 2010/09/17

最近の投稿

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'),