By Joshua Nelson
Has 2 other scripts.
// JavaScript Document
// ==UserScript==
// @name Wikipedia Edit First Section
// @description Edit the first section of a story in wikipedia
// @include http://en.wikipedia.org/wiki/*
// @include http://en.wikipedia.org/wiki/Main_page*
// ==/UserScript==
//gets the original page for inserting after the customized content.
OriginalPassage = document.getElementById("bodyContent").innerHTML
//sets currentURL to the current URL
currentURL = document.URL
//retreives the topic of the page for later
topic = currentURL.substring(currentURL.lastIndexOf("/") + 1,currentURL.length)
window.edittarget = "http://en.wikipedia.org/w/index.php?title=" + topic + "&action=edit§ion=0"
//Splits the eventual target into two parts so that the quotation marks are not mixed up
edithtmlA = '<div style="text-align: right;"> [<a href='
edithtmlB = 'http://en.wikipedia.org/w/index.php?title=' + topic + '&action=edit§ion=0> edit </a>]</div>'
document.getElementById("bodyContent").innerHTML = (edithtmlA + edithtmlB + OriginalPassage)