User talk:Dycedarg/easyprod.js

From OpenWetWare
Jump to: navigation, search

This script allows you to propose a page for deletion in one click, and optionally add {{prodwarning}} to their page with your signature.

Using the script

First you'll have to add it to your javascript. To do that add the following to your monobook.js page:

importScript('User:Dycedarg/easyprod.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');

Note: If you have already added the LI menu lines for a script such as Twinkle, you do not have to add them again. Otherwise they are necessary for the script to work.

Then, after you bypass your browser cache, you will see a tab at the top of all articles and userpages marked prod. If you hover your mouse over it a menu will drop down, and you can select whether or not you want to notify the original poster. After that you're prompted for a reason and then you're done.

Requirements

Tested in Firefox, but I believe it will also work in Opera. As of now it is not supported by IE. If you're using a pop-up blocker, you'll have to add en.wikipedia.org to the list of exceptions for the notify original contributor part of the code to work.

Customization

If you wish to post something other than {{prodwarning}} on the original contributer's page when you use the script, you may select your own page for transclusion by making the template in your userspace and then entering the following on your monobook.js after the importScript lines:

var customnotifytemplate="<page to be transcluded>";

Example: If I wanted to link to a page in my userspace called customprodwarning I'd put

var customnotifytempalte="User:Dycedarg/customprodwarning";

Note that the page to be transcluded should have [[{{{1}}}]] anywhere you wish to link to the title of the article you prodded.

If you wish to prod articles with a standard reason rather than be prompted for it each time, enter the following on your monobook.js page after the importScript lines:

var customreason="<reason>";

If these variables are missing the script will work as described in the above section.