User talk:Korath/autovfd.js
This script does not function in Internet Explorer. Please upgrade to a modern, secure, standards-conforming browser, such as Firefox or Opera. You'll be glad you did.
Installation
[edit]This should be copied verbatim into monobook.js. If you are not using the Monobook skin, you'll need to replace the add_link() function and install the script elsewhere; see below for details.
Usage
[edit]You must allow popups for this script to work. Additionally, the determination of the correct daily subpage to use depends on your computer's time being correctly set.
This script adds a "vfd" tab when editing pages. Clicking on it will insert the vfd header into the article currently being edited and set the edit summary to "vfd".
It will also pop up two windows to complete the vfd process: today's vfd daily subpage (for example, Wikipedia:Votes for deletion/Log/2024 November 24), and a subpage of vfd for the specific article (for example, Wikipedia:Votes for deletion/autovfd.js).
The daily subpage will be automatically edited to transclude the article's subpage ({{Wikipedia:Votes for deletion/autovfd.js}}) with a summary linking to it ([[Wikipedia:Votes for deletion/autovfd.js]]). You should save this edit first to reduce the likelihood of an edit conflict.
The article's specific subpage will be automatically edited as below. (You should, of course, change "Reason for nomination" to your actual reason for nominating the article for deletion.)
===[[User:Korath/autovfd.js]]=== Reason for nomination. ~~~~ * * *
If there is already text at the article's subpage, you'll instead get a warning saying that you'll have to file the vfd by hand, following the instructions at Template:VfDFooter.
For all three edits—the article, the daily vfd subpage, and the article's vfd subpage—you must click on the "Save page" button yourself. This is intentional.
For alternate skins
[edit]Classic
[edit]For the Classic skin, the script should be installed in standard.js.
To place the link in the page header, replace add_link() with:
function add_link(url, name) { var na = document.createElement('a'); na.setAttribute('href', url); na.appendChild(document.createTextNode(name)); var td = document.getElementById('topbar').getElementsByTagName('table')[0]. getElementsByTagName('td')[1].getElementsByTagName('p')[0]; if (td.hasChildNodes()) td.appendChild(document.createTextNode(' | ')); td.appendChild(na); }
To place the link in the quickbar, replace add_link() with:
function add_link(url, name) { var na = document.createElement('a'); na.setAttribute('href', url); na.appendChild(document.createTextNode(name)); var qb = document.getElementById('quickbar'); qb.appendChild(na); }
Cologne Blue
[edit]For the Cologne Blue skin, the script should be installed in cologneblue.js.
(To be written, once someone indicates that he actually uses this, and where the link should appear.)
Nostalgia
[edit]For the Nostalgia skin, the script should be installed in nostalgia.js.
(To be written, once someone indicates that he actually uses this, and where the link should appear.)