User:Yecril/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
Gerbrant = {fw: {load: [

"Gerbrant.edit.autoReplace"

]},

edit: { autoReplace:
 {
     noDefault: true,
     defs:
     [  
  { // defs[0]
re: "{{([H|C|D|S])s}}", 
hf: 
function getSuitTemplate(a, b) { 
return (
"{{" 
+ { C: "Clubs", D: "Diams", H: "Hearts", S: "Spades" }[b]
+ "}}") } /* /getSuitTemplate */ } /* /defs[0] */, 
{ /* defs[1] */ 
re: "{{h\\|", 
hf: 
function getHiddenSorter(a, b) 
{ return "{{hs|" } /* /getHiddenSorter */ } /* /defs[1] */
     ] /* /defs */
 } /* /autoreplace */ } /* /edit */

} /* /Gerbrant */

document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Gerbrant/fw.js&action=raw&ctype=text/javascript&dontcountme=s"><\u002fscript>');