TextileChat

Adds a variant textile support to chat

  1. // ==UserScript==
  2. // @name TextileChat
  3. // @namespace skyboy@kongregate
  4. // @author skyboy
  5. // @version 1.0.1.1
  6. // @description Adds a variant textile support to chat
  7. // @include *://www.kongregate.com/games/*/*
  8. // @homepage
  9. // ==/UserScript==
  10. if (/^\/?games\/[^\/]+\/[^\/?]+(\?.*)?$/.test(window.location.pathname))
  11. setTimeout(function() {
  12. window.location.assign("javascript:holodeck.addIncomingMessageFilter(function(m,nF){return nF(m.gsub(/[\\s\\S]+/, function(b,t){b=b[0];while(!!(a=b.match(/(\\[|\\B)(\\||\\+|\\_|\\-)((?:\\b|<)[\\s\\S]+(?:\\b|>))\\2(\\]|\\B)/i))){switch(a[2]){case'|':t='b';break; case'+':t='u';break; case'_':t='i';break; case'-':t='strike'}; b=b.replace(a[0],'<'+t+'>'+a[3]+'</'+t+'>')};return b}), nF);});void(0)");
  13. }, 1250);