Jump to content

User talk:Cryptic/smiley.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

User:Cryptic/smiley.js is an odious little script that replaces various ascii smilies with images from the Commons.

Installation

[edit]

Copy the contents of User:Cryptic/smiley.js into your user js file. This will be in one of the following locations depending on the skin you're using:

Smilies replaced

[edit]
=) :) :-) =) 
:D :-D =D 
:( :-( =( 
;) ;-) ;D ;-D 
:p :-p :P :-P =p =P 
:'( :'-( 
8) 8-) 8D 8-D 

How to add more

[edit]

Each line in the smiley array at the start of the script consists of an array containing the following elements:

  1. A regular expression for the text to be replaced. Note that backslashes ("\") need to be doubled.
  2. The image name.
  3. The subdirectory where the image is stored. For example, if the image is at http://upload.wikimedia.org/wikipedia/commons/2/26/Smile.png, this should be "2/26".
  4. The image width.
  5. The image height.

Deficiencies

[edit]
OSZAR »