Skip to content

Commit

Permalink
Merge github.com:azatoth/twinkle
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinji committed Jan 30, 2012
2 parents 8c28ca4 + c966172 commit 0c3f898
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 32 deletions.
2 changes: 1 addition & 1 deletion modules/friendlywelcome.js
Expand Up @@ -507,7 +507,7 @@ Twinkle.welcome.callbacks = {
" template to user talk page";
pageobj.setPageText(text);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markWelcomesAsMinor'));
pageobj.setMinorEdit(false);
pageobj.setWatchlist(Twinkle.getFriendlyPref('watchWelcomes'));
pageobj.setCreateOption('recreate');
pageobj.save();
Expand Down
4 changes: 2 additions & 2 deletions modules/twinklebatchdelete.js
Expand Up @@ -282,7 +282,7 @@ Twinkle.batchdelete.callbacks = {
return;
}

var params = clone( self.params );
var params = $.extend({}, self.params);
params.current = 0;
params.total = total;
params.obj = statusIndicator;
Expand Down Expand Up @@ -336,7 +336,7 @@ Twinkle.batchdelete.callbacks = {
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var title = snapshot.snapshotItem(i).value;
var wikipedia_page = new Wikipedia.page( title, "Unlinking on " + title );
var params = clone( self.params );
var params = $.extend( {}, self.params );
params.title = title;
params.onsuccess = onsuccess;
wikipedia_page.setCallbackParameters(params);
Expand Down
5 changes: 0 additions & 5 deletions modules/twinkleconfig.js
Expand Up @@ -615,11 +615,6 @@ Twinkle.config.sections = [
helptip: "Strongly recommended.",
type: "boolean"
},
{
name: "markWelcomesAsMinor",
label: "Mark welcomes as minor edits",
type: "boolean"
},
{
name: "maskTemplateInSummary",
label: "Omit the name of the welcome template in the edit summary",
Expand Down
4 changes: 2 additions & 2 deletions modules/twinklespeedy.js
Expand Up @@ -887,7 +887,7 @@ Twinkle.speedy.callbacks = {

Wikipedia.addCheckpoint();

var params = clone( apiobj.params );
var params = $.extend( {}, apiobj.params );
params.current = 0;
params.total = total;
params.obj = statusIndicator;
Expand Down Expand Up @@ -1217,7 +1217,7 @@ Twinkle.speedy.getParameters = function twinklespeedyGetParameters(value, normal
case 'g6':
switch( value ) {
case 'histmerge':
var mergetitle = prompt( 'Please enter the title to merge into:', "" );
var mergetitle = prompt( 'Please enter the title to be merged into this one:', "" );
if (mergetitle === null)
{
statelem.error( 'Aborted by user.' );
Expand Down
2 changes: 1 addition & 1 deletion modules/twinkleunlink.js
Expand Up @@ -97,7 +97,7 @@ Twinkle.unlink.callback.evaluate = function twinkleunlinkCallbackEvaluate(event)
var params = { reason: reason, imageusage: imageusage, globalstatus: statusIndicator, current: 0, total: total };
for (var i = 0; i < pages.length; ++i)
{
var myparams = clone(params);
var myparams = $.extend({}, params);
var articlepage = new Wikipedia.page(pages[i], 'Unlinking in article "' + pages[i] + '"');
articlepage.setCallbackParameters(myparams);
articlepage.load(imageusage ? Twinkle.unlink.callbacks.unlinkImageInstances : Twinkle.unlink.callbacks.unlinkBacklinks);
Expand Down
20 changes: 0 additions & 20 deletions morebits.js
Expand Up @@ -936,26 +936,6 @@ Unbinder.getCallback = function UnbinderGetCallback(self) {
};


/**
* **************** clone() ****************
* REMOVEME - global namespace pollution -> move to better name, or
* rework the few usages using jQuery.extend
*/

function clone( obj, deep ) {
var objectClone = new obj.constructor();
for ( var property in obj ) {
if ( !deep ) {
objectClone[property] = obj[property];
} else if ( typeof obj[property] === 'object' ) {
objectClone[property] = clone( obj[property], deep );
} else {
objectClone[property] = obj[property];
}
}
return objectClone;
}


/**
* **************** Namespace ****************
Expand Down
1 change: 0 additions & 1 deletion twinkle.header.js
Expand Up @@ -131,7 +131,6 @@ Twinkle.defaultConfig.friendly = {
insertHeadings: true,
insertUsername: true,
insertSignature: true, // sign welcome templates, where appropriate
markWelcomesAsMinor: true,
quickWelcomeMode: "norm",
quickWelcomeTemplate: "welcome",
maskTemplateInSummary: true,
Expand Down

0 comments on commit 0c3f898

Please sign in to comment.