KAT - Add IMG bbcode

Allows highlighting url and then clicking or using Ctrl + I to make IMG bbcode

2015-07-26 기준 버전입니다. 최신 버전을 확인하세요.

작성자
gazza-911
평점
0 0 0
버전
1.02
생성일
2015-07-26
갱신일
2015-07-26
크기
2.5KB
라이선스
해당 없음
적용 사이트

What this script actually does:

* Adds IMG to the bbcode toolbar on KAT

* Also allows the usage of Ctrl + I to use this new button

* Upon clicking, will check highlighted text to see if it's a URL and then encapsulate it in a [IMG]url[/IMG] bbcode;

If no text is highlighted, or it is not a URL, the user is prompted to enter the URL. Then, either a bbcode with the URL, or an empty IMG bbcode (if no/invalid URL is entered) is inserted at the cursor (caret) position.
You can change this so that instead, it simply adds [IMG][/IMG] to the position by changing the value of promptUser to 0

Installation Instructions:

1a. Firefox users: Download Greasemonkey
1b. Chrome users: Download Tampermonkey

2. Click the green install button on the left-hand side of the screen.

Follow the on-screen prompt, and click 'Install' / 'Ok' on the pop-up window then you're good to go.

Known Issues:

* None (if you see any, let me know!)

P.S If you use a mirror rather than the normal kat.cr site, you'll need to edit the script; change the 'match' / 'exclude' statements to the domain you're using (you can add multiple if you like).