how to add new keywords?

in
Subscribe to how to add new keywords? 2 posts, 2 voices



justin759 User

Hi! I want to add a keyword "測驗" to the filter, how should I edit the code?

Thanks!!

 
myqwong Script's Author

Hi Justin,

You can add |測驗 to the back of the regular expression, like this

var regEx = /t(ake|ook)\s*th(e|is)\s*quiz/i;

to

var regEx = /t(ake|ook)\s*th(e|is)\s*quiz|測驗/i;

You also need to save the script in UTF-8 format. If you are using Windows, edit the script in Notepad (don't use WordPad) & click "Save As...", in the "Save As" dialog box, change the "Encoding" select value to "UTF-8" and click "Save".

To add a new phrase, just add a | character & the phrase to the back of the regular expression like above.

If you like, you can check out more Javascript regular expression abilities here

https://developer.mozilla.org/En/Core_JavaScrip...

Get me again if you face any problems or annoying application news feeds.