User:Scientizzle/vector.js

importScript('User:JeremyMcCracken/contribstab.js');

importScript('User:Ale_jrb/Scripts/userhist.js');  //[[User:Ale_jrb/Scripts]]

//this helps automate AfD closing by adding a 'close' tab to AfD debates
//written by [[User:Johnleemk]] based on [[Wikipedia:WikiProject User scripts/Scripts/test-n.js]] by [[User:Celestianpower]]

function autoafd_result()
{
  var close = prompt("Result of debate?")
  var f = document.editform, t = f.wpTextbox1;
  t.value = t.value.split('{{REMOVE THIS TEMPLATE WHEN CLOSING THIS AfD').join('{{ns:0');
  t.value = "{{subst:" + "at" + "}} '''" + close + "'''. " + "~" + "~" + "~" + "~" + '\n' + '\n' + t.value;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "{{subst:" + "ab" + "}}";
  f.wpSummary.value = "Closing debate; result was " + close;
}

function autoafd_relist()
{
  var f = document.editform, t = f.wpTextbox1;
  if (t.value.length > 0)
    t.value += '\n';
  t.value += "{{subst:" + "relist" + "|~" + "~" + "~" + "~}}";
  f.wpSummary.value = "Relisting debate";
}

function autoafd_keep()
{
  var date = prompt("Nomination was made when?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;

    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }

  t.value = "{{subst:" + "oldafdfull" + "|date=" + date + "|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "Article survived AfD";
}

function autoafd_no_consensus()
{
  var date = prompt("Nomination was made when?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;

    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }

  t.value = "{{subst:" + "oldafdfull" + "|date=" + date + "|result='''no consensus'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "Article survived AfD with no consensus";
}

function autoafd_redirect()
{
  var date = prompt("Nomination was made when?")
  var redirect = prompt("Redirect to?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;

    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }

  t.value = "{{subst:" + "oldafdfull" + "|date=" + date + "|result='''redirect to [[" + redirect + "]]'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "Article redirected to [[" + redirect + "]] as per AfD";
}

function autoafd_merge()
{
  var date = prompt("Nomination was made when?")
  var redirect = prompt("Merge and redirect to?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;

    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }

  t.value = "{{subst:" + "oldafdfull" + "|date=" + date + "|result='''merge and redirect to [[" + redirect + "]]'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "Article merged and redirected to [[" + redirect + "]] as per AfD";
}

function autoafd_other()
{
  var date = prompt("Nomination was made when?")
  var result = prompt("Result was?")
  var votepage = prompt("Vote page is? (Enter 'd' for default.)")
  var f = document.editform, t = f.wpTextbox1;

    // If default votepage...
    if (votepage=="d")
      {
        var temp = document.editform.action.split("/w/index.php?title=");
        var temp = temp[1].split("&action=submit");
        var temp = temp[0].substring(5);
        var votepage = temp;
      }

  t.value = "{{subst:" + "oldafdfull" + "|date=" + date + "|result='''" + result + "'''|votepage=" + votepage + "}}" + '\n' + '\n' + t.value;
  f.wpSummary.value = "AfDed; result was " + result;
}

function autoafd_add_afd_tabs()
{
  // Only add for pages with the right string somewhere in the title
  if (document.title.indexOf("Editing Wikipedia:Articles for deletion/") != -1)
    {
      mw.util.addPortletLink('p-cactions', 'javascript:autoafd_result()', "close");
      mw.util.addPortletLink('p-cactions', 'javascript:autoafd_relist()', "relist");
    }
  if (document.title.indexOf("Editing Talk:") != -1)
    {
      mw.util.addPortletLink('p-cactions', 'javascript:autoafd_keep()', "keep");
      mw.util.addPortletLink('p-cactions', 'javascript:autoafd_no_consensus()', "no consensus");
      mw.util.addPortletLink('p-cactions', 'javascript:autoafd_redirect()', "redirect");
      mw.util.addPortletLink('p-cactions', 'javascript:autoafd_merge()', "merge");
      mw.util.addPortletLink('p-cactions', 'javascript:autoafd_other()', "other");
    }
}

$(autoafd_add_afd_tabs);

//end AfD closing script

importScript('Wikipedia:WikiProject User scripts/Scripts/Changes since I last edited');

// CSD AutoReason
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:^demon/csd.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');


importScript('User:Dr_pda/editrefs.js'); //[[User:Dr_pda/editrefs.js]]





importScript('User:AzaToth/twinkle.js');

if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {}; // DO NOT REMOVE THIS LINE - ALL TWINKLE SETTINGS AFTER THIS
TwinkleConfig.batchdeleteChunks                         =       50;
TwinkleConfig.batchDeleteMinCutOff                      =       5;
TwinkleConfig.batchMax                                  =       5000;
TwinkleConfig.batchProtectChunks                        =       50;
TwinkleConfig.batchProtectMinCutOff                     =       5;
TwinkleConfig.batchundeleteChunks                       =       50;
TwinkleConfig.batchUndeleteMinCutOff                    =       5;
TwinkleConfig.blankTalkpageOnIndefBlock                 =       false;
TwinkleConfig.defaultWarningGroup                       =       1;
TwinkleConfig.deleteTalkPageOnDelete                    =       false;
TwinkleConfig.deletionSummaryAd                         =       ' using [[WP:TW|TW]]';
TwinkleConfig.deliChunks                                =       500;
TwinkleConfig.deliMax                                   =       5000;
TwinkleConfig.deliWatchPage                             =       "no";
TwinkleConfig.deliWatchUsages                           =       "no";
TwinkleConfig.deliWatchUser                             =       "no";
TwinkleConfig.markAIVReportAsMinor                      =       true;
TwinkleConfig.markSockReportAsMinor                     =       true;
TwinkleConfig.markUAAReportAsMinor                      =       true;
TwinkleConfig.markRevertedPagesAsMinor                  =       [ 'vand' ];
TwinkleConfig.markSpeedyPagesAsMinor                    =       false;
TwinkleConfig.markSpeedyPagesAsPatrolled                =       true;
TwinkleConfig.notifyUserOnDeli                          =       true;
TwinkleConfig.notifyUserOnSpeedyDeletionNomination      =       [ 'g1', 'g2', 'g3', 'g4', 'g10', 'g11', 'g12', 'a1', 'a2', 'a3', 'a5', 'a7', 'a9', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f9', 'f10', 'f11', 'u3', 't2', 't3', 'p2' ];
TwinkleConfig.offerReasonOnNormalRevert                 =       true;
TwinkleConfig.openTalkPage                              =       [ 'agf', 'norm', 'vand' ];
TwinkleConfig.openTalkPageOnAutoRevert                  =       false;
TwinkleConfig.openUserTalkPageOnSpeedyDelete            =       [ 'g1', 'g2', 'g3', 'g4', 'g5', 'g10', 'g11', 'g12', 'a1', 'a3', 'a7', 'a9', 'f3', 'f4', 'f5', 'f6', 'f7', 'f9', 'f11', 'u3', 't2' ];
TwinkleConfig.orphanBacklinksOnSpeedyDelete             =       {exclude:['g6'], orphan:true};
TwinkleConfig.proddeleteChunks                          =       50;
TwinkleConfig.prodReasonDefault                         =       "";
TwinkleConfig.protectionSummaryAd                       =       ' using [[WP:TW|TW]]';
TwinkleConfig.revertMaxRevisions                        =       50;
TwinkleConfig.showRollbackLinks                         =       [ 'diff', 'others' ];
TwinkleConfig.showSharedIPNotice                        =       true;
TwinkleConfig.speedyWindowHeight                        =       500;
TwinkleConfig.speedyWindowWidth                         =       800;
TwinkleConfig.summaryAd                                 =       ' using [[WP:TW|TW]]';
TwinkleConfig.unlinkNamespaces                          =       [ 0, 100 ];
TwinkleConfig.userTalkPageMode                          =       'window';
TwinkleConfig.watchProdPages                            =       true;
TwinkleConfig.watchRevertedPages                        =       [];
TwinkleConfig.watchSpeedyPages                          =       [];
TwinkleConfig.watchWarnings                             =       false;
TwinkleConfig.welcomeUserOnSpeedyDeletionNotification   =       TwinkleConfig.notifyUserOnSpeedyDeletionNomination;
TwinkleConfig.xfdWatchDiscussion                        =       "no";
TwinkleConfig.xfdWatchList                              =       "no";
TwinkleConfig.xfdWatchPage                              =       "no";
TwinkleConfig.xfdWatchUsages                            =       "no";
TwinkleConfig.xfdWatchUser                              =       "no";
FriendlyConfig.clockStyle                       =       "dynamic";
FriendlyConfig.enableClock                      =       true;
FriendlyConfig.groupByDefault                   =       true;
FriendlyConfig.idsToRename                      =       [
                { id: 'ca-nstab-main', name: 'Main', mainPageOnly: true },
                { id: 'ca-nstab-help', name: 'Help' },
                { id: 'ca-nstab-special', name: 'Special' },
                { id: 'ca-nstab-project', name: 'Project' },
                { id: 'ca-nstab-user', name: 'User' },
                { id: 'ca-edit', name: 'Edit' },
                { id: 'ca-viewsource', name: 'Source' },
                { id: 'ca-talk', name: 'Talk' },
                { id: 'ca-undelete', name: 'Undelete' },
                { id: 'ca-addsection', name: '+' }
        ];
FriendlyConfig.insertHeadings                   =       true;
FriendlyConfig.insertSignature                  =       true; //sign welcome templates, where appropriate
FriendlyConfig.insertTalkbackSignature          =       true; //always sign talkback templates
FriendlyConfig.insertUsername                   =       true;
FriendlyConfig.markSharedIPAsMinor              =       true;
FriendlyConfig.markTaggedPagesAsMinor           =       false;
FriendlyConfig.markTaggedPagesAsPatrolled       =       true;
FriendlyConfig.markTalkbackAsMinor              =       true;
FriendlyConfig.markWelcomesAsMinor              =       true;
FriendlyConfig.maskTemplateInSummary            =       true;
FriendlyConfig.quickWelcomeMode                 =       "semiauto";
FriendlyConfig.quickWelcomeTemplate             =       "Welcome";
FriendlyConfig.talkbackHeading                  =       "== Talkback ==";
FriendlyConfig.topWelcomes                      =       false;
FriendlyConfig.watchTaggedPages                 =       false;
FriendlyConfig.watchWelcomes                    =       false;
FriendlyConfig.welcomeHeading                   =       "== Welcome to Wikipedia ==";

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.