Content deleted Content added
test4 |
0.9.92 rc3 (September 21, 2010) |
||
Line 4:
// version info
wikEd.programVersion = '0.9.92
wikEd.programDate = 'September
/*
Program description
wikEd is a full-featured
wikEd features syntax highlighting with code check and reference and template folding,
on-page Show preview and Show changes, and advanced search and replace functions.
wikEd works under all web browsers except Internet Explorer and Opera.
The code has to be saved as UTF-8 in your editor to preserve Unicode characters like ♥ (heart)
Greasemonkey metadata:
// ==UserScript==
Line 21 ⟶ 25:
// @include *
// @exclude
//▼
// @homepage http://en.wikipedia.org/wiki/User:Cacycle/wikEd
// @source http://en.wikipedia.org/wiki/User:Cacycle/wikEd.js
Line 28 ⟶ 31:
// ==/UserScript==
*/▼
▲*/
▲//
// start of user configurable variables
//
//
Line 3,530 ⟶ 3,519:
// make the ajax request
wikEd.AjaxRequest(
▲ wikEd.AjaxRequest(requestMethod, requestUrl, postFields, overrideMimeType, function(ajax, obj) {
// get response
Line 3,604 ⟶ 3,589:
// make the ajax request
wikEd.AjaxRequest('GET', wikEd.config.regExTypoFixURL, null, 'text/plain', function(ajax) {
wikEd.AjaxRequest(requestMethod, requestUrl, postFields, overrideMimeType, function(ajax) {▼
// get response
Line 8,530 ⟶ 8,511:
}
var requestUrl = wikEd.scriptURL + 'api.php';
// make the ajax request
wikEd.AjaxRequest(
// get response
Line 14,664 ⟶ 14,643:
// make the ajax request
▲ wikEd.AjaxRequest(
return;
Line 14,686 ⟶ 14,663:
// assemble string body
if (typeof(FormData) != 'function') {
Line 14,696 ⟶ 14,672:
// assemble body data
formData = '
for (var fieldName in postFields) {
if (postFields.hasOwnProperty(fieldName) == true) {
Line 14,704 ⟶ 14,680:
}
formData += '--' + boundary + '--\r\n';
}
Line 14,783 ⟶ 14,757:
// open the request
request.open(requestMethod, requestUrl, true);
// set the headers
Line 14,789 ⟶ 14,762:
if (headers.hasOwnProperty(headerName) == true) {
request.setRequestHeader(headerName, headers[headerName]);
}
}
Line 14,795 ⟶ 14,767:
// set the mime type
if ( (request.overrideMimeType != null) && (overrideMimeType != null) ) {
request.overrideMimeType(overrideMimeType);
}
Line 14,810 ⟶ 14,781:
request.onreadystatechange = function() {
if (request.readyState != 4) {
return;
}
ResponseHandler(request);
return;
Line 14,874 ⟶ 14,843:
if (event.source != window) {
if ( (event.origin != 'null') && (event.origin != null) && (event.origin != window.___location.protocol + '//' + window.___location.host) ) {
}
var globalObj = JSON.parse(event.data);
var globals = globalObj.wikEdGetGlobals;
Line 15,173 ⟶ 15,142:
wikEd.CreateRandomString = function(strLength, charSet) {
charSet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789';
}
|