User talk:Philip J. Rayment/Welcome script

From Conservapedia

Jump to: navigation, search

Contents

Description

This code adds a "welcome" tab after the other tabs on user talk pages that are opened for editing. This allows you to put a welcome notice on user talk pages without having to do any typing.

Clicking that tab will:

  • Put {{welcome|sig=~~~~}} in the edit box (at the end if there is already other text there)
  • Put welcome in the edit summary.

You will still need to click the Save page button to submit the edit, so you can make other changes as well if you wish.

Installing this code

To use the Welcome script, add the code below to your Javascript page for the skin(s)[1] you are using.

That is, if you are using the monobook skin, go to [[user:your ID/monobook.js]]. If you are using the (default) Conserv skin, go to [[user:your ID/conserv.js]].

After pasting in the code and saving the page, follow the instructions on that page regarding clearing your browser's cache.

Caveats

  • I'm not a Javascript expert. This code works for me (so far), but it has not been widely tested. Please let me know if you encounter problems.
  • I presume that "conserv.js" is the name for the default skin; I haven't tested it yet. If you try it, please let me know if it works.
  • I presume that the code will work with skins other than monobook, but again, I haven't tested it. If you try it, please let me know if it works.
  • I use this code in Maxthon, which uses the Internet Explorer engine (I have IE 6). I have tried it once in Mozilla Firefox 2, and it worked okay. Another user has reported moderate display-corruption problems with using it in IE 7.

Code

document.write('<script type="text/javascript" src="' 
             + 'http://www.conservapedia.com/User:Philip_J._Rayment/Welcome_script' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

NOTE: Do not change the reference to my name in this code to yours. This code on your page will call my code.

Debugging

If you have problems getting this to work, and I ask you to use the debugging code, instead of using the code above, use the following code instead:

document.write('<script type="text/javascript" src="' 
             + 'http://www.conservapedia.com/User:Philip_J._Rayment/Welcome_script (debugging)' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

This code will cause various message boxes to pop up, likely every time you open or refresh a page, which will be a nuisance.

Install this code, clear your browser's cache, open a talk page for editing, and note down all the messages that pop up, including their order. (You don't need to record text in brackets.) Then remove this code and clear your browser's cache again. Let me know the messages that you get.

Notes

  1. To see what skin you are using, see special:preferences and select the "skin" tab.
Personal tools