Jump to content

User:Newmanbe/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pathoschild (talk | contribs) at 02:27, 27 December 2006 (updated write path). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
// <pre>
/*
#########
### TemplateScript 0.5-alpha
###  by [[user:Pathoschild]]
###    * adds a menu of user-defined, form-specific templates
###    * documentation: [http://meta.wikimedia.org/wiki/user:pathoschild/Script:TemplateScript]
#########
*/

document.write('<script type="text/javascript" src="'
  + 'http://meta.wikimedia.org/w/index.php?title=User:Pathoschild/Script:TemplateScript.js' 
  + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
        
/* define templates */
function define_templates() {
        /* syntax: new_template('type','name','text','optional 1','optional 2','optional 3');
             see documentation
        */

        /* ### edit templates below ### */
        new_template('edit','Permission in OTRS','{{PermissionOTRS\n|ticket=\n}} --~~~~');
        /* ### edit templates above ### */
        }

/* Load script */
addOnloadHook(function() {templatescript(define_templates())});

// </pre>