Greasy Fork 还支持 简体中文。

LongMessages *OLD*

When a chat message is > 250 chars, the first 250 are sent and the remainder are put back in the input box

  1. // ==UserScript==
  2. // @name LongMessages *OLD*
  3. // @namespace skyboy@kongregate
  4. // @version 1.1.0
  5. // @description When a chat message is > 250 chars, the first 250 are sent and the remainder are put back in the input box
  6. // @author skyboy
  7. // @include http://www.kongregate.com/games/*/*
  8. // @homepage http://userscripts-mirror.org/scripts/show/93328
  9. // ==/UserScript==
  10. if (/^\/?games\/[^\/]+\/[^\/?]+(\?.*)?$/.test(window.location.pathname)) {
  11. setTimeout(function() {
  12. javascript:void(window.location.assign("javascript:void(document.observe('holodeck:ready',function(){var sv=function(v){holodeck.activeDialogue()._input_node.value = v};holodeck.addOutgoingMessageFilter(function(m,n) {if (m.length) {m = m.replace(/[\\r\\n]+/,' ').replace(/\\s+$/,'').replace(/^\\s+/, '').replace(/\\s{2,}/, ' ');if (m.length > 250) {setTimeout(sv, 0, m.substr(250));m = m.substring(0, 250);}}n(m, n);})}));"));
  13. }, 1250);
  14. }