Szerkesztő:Porrima/vektor.js

A Wikipédiából, a szabad enciklopédiából

Megjegyzés: közzététel után frissítened kell a böngésződ gyorsítótárát, hogy lásd a változásokat.

  • Firefox / Safari: tartsd lenyomva a Shift gombot és kattints a Frissítés gombra a címsorban, vagy használd a Ctrl–F5 vagy Ctrl–R (Macen ⌘–R) billentyűkombinációt
  • Google Chrome: használd a Ctrl–Shift–R (Macen ⌘–Shift–R) billentyűkombinációt
  • Internet Explorer / Edge: tartsd nyomva a Ctrl-t, és kattints a Frissítés gombra, vagy nyomj Ctrl–F5-öt
  • Opera: Nyomj Ctrl–F5-öt
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Mr.Z-man/refToolbar_2.0.js&action=raw&ctype=text/javascript&dontcountme=s;');
popupFixRedirs = true;
popupFixDabs = true;

function webcitebutton() {

     mw.util.addPortletLink('p-cactions', 'javascript:webciteEverything()', "Web cite", "ca-websiteeverything", "Külső linkek tároltatása a Web Cite-tal");
  
}
$(webcitebutton);
function webciteEverything() {
    for (var i in document.links) {
 if (document.links[i].href.indexOf('wikipedia') == -1) {
 if (document.links[i].href.indexOf('mediawiki.org') == -1) {
 if (document.links[i].href.indexOf('wikimedia') == -1) {
 if (document.links[i].href.indexOf('javascript:') == -1) {
 if (document.links[i].href.indexOf('creativecommons.org') == -1) {
window.open('http://www.webcitation.org/archive?url='+escape(document.links[i].href)+'&email=bdamokos@gmail.com&returnxml=true' ); }
    }}}}}
}

function assess(templateName) {
  var quality = prompt('Minőség:');
  if(quality == null) return false;
  var importance = prompt('Fontosság:');
  if(importance == null) return false;
 
  var today = new Date();
  var dateString = 
    today.getFullYear() + "-" + 
    (today.getMonth() + 1) + "-" +
    today.getDate();
  var template = 
    "{{" + templateName + 
    "|besorolás=" + quality + 
    "|fontosság=" + importance + 
    "|szerkesztő=" + wgUserName + 
    "|dátum=" + dateString + 
    "}}";
 
  if (typeof(wikEdUseWikEd) != 'undefined') {
    if (wikEdUseWikEd == true) {
      WikEdUpdateTextarea();
    }
  }
  var textarea = document.editform.wpTextbox1;
 
  if(textarea.value.match("{{" + templateName ))
    textarea.value = textarea.value.replace(new RegExp("\\{\\{" + templateName + ".*?\\}\\}"), template);
  else
    textarea.value = template + '\n' + textarea.value;
 
  if (typeof(wikEdUseWikEd) != 'undefined') {
    if (wikEdUseWikEd == true) {
      WikEdUpdateFrame();
    }
  }
 
  var summary = document.editform.wpSummary;
  summary.value = "cikk értékelése";
 
  return false;
}
 
function addAssessButton(templateName, image, tip) {
  // FIXME néha eltünteti a többi gombot (wikEd miatt?)
  var toolbar = document.getElementById('toolbar');
  if (!toolbar) { return false; }
 
  mwInsertEditButton(toolbar, {
    "imageId": "editbutton-assess-" + templateName,
    "imageFile": image,
    "speedTip": tip,
    "tagOpen": "",
    "tagClose": "",
    "sampleText": ""
  });
  var button = document.getElementById("editbutton-assess-" + templateName);
  button.onclick = function() {assess(templateName);};
}
 
$(function() {
  addAssessButton("WPMTR", "http://upload.wikimedia.org/wikipedia/commons/e/e9/Button_copy_edit.png", "Cikkértékelés");
}); //cikkértékelés-end

importScript("User:BáthoryPéter/interwikiFordito.js");

if (wgCanonicalNamespace == 'Special' && wgCanonicalSpecialPageName == 'OldReviewedPages') {

   addOnloadHook(function() {

      $('<button>Következő 5</button>').insertBefore($('#bodyContent ul')).css({float: 'right'}).click(function() {

         $('#bodyContent ul a[href$="diffonly=0"]:contains("ellenőriz")').slice(0, 5).each(function() {

            window.open($(this).attr('href'), '_blank');

         });

      });

   });

}