User:Andrewds1021/global.js

if (["MSIE", "Trident/7."].some(function (arg) { return (navigator.userAgent.indexOf(arg) >= 0); })) {   importArticles({        type: "style",        article: "u:w:User:Andrewds1021/IE11.css"    }); }

$(function {    list_link = document.getElementById("ca-formedit");    if (list_link == null) {        return;    }    list_line = list_link.parentElement;    list = list_line.parentElement;    edit_link = list.parentElement.parentElement.previousElementSibling;    ll_temp = "";    switch (edit_link.id) {        case "ca-viewsource":            ll_temp = list_link.innerHTML;            list_link.innerHTML = edit_link.lastElementChild.innerHTML;            edit_link.lastElementChild.innerHTML = ll_temp;            break;        case "ca-edit":            list_link.accessKey = edit_link.accessKey;            edit_link.removeAttribute("accesskey");            list_link.innerHTML = "Classic editor";            break;        case "ca-ve-edit":            list_link.accessKey = edit_link.accessKey;            edit_link.removeAttribute("accesskey");            list_link.innerHTML = "VisualEditor"; break; default: return; }   ll_temp = list_link.id; list_link.id = edit_link.id; edit_link.id = ll_temp; ll_temp = list_link.getAttribute("data-tracking"); list_link.setAttribute("data-tracking", edit_link.getAttribute("data-tracking")+"-dropdown"); edit_link.setAttribute("data-tracking", ll_temp.replace("-dropdown", "")); ll_temp = list_link.getAttribute("href"); list_link.setAttribute("href", edit_link.getAttribute("href")); edit_link.setAttribute("href", ll_temp); list.insertBefore(list_line, list.firstElementChild); });

$(function {    edit_buttons = $(".page-header__contribution-buttons .wds-button-group")[0];    if (edit_buttons == undefined || (edit_buttons.firstElementChild.lastElementChild.innerHTML != "Create")) {        return;    }    list = edit_buttons.lastElementChild.lastElementChild.firstElementChild;    list_item = document.createElement("li");    list_link = document.createElement("a");    link_text = document.createTextNode("Create with form");    list_link.id = "ca-form-create";    list_link.setAttribute("data-tracking", "ca-form-create-dropdown");    list_link.href = "/wiki/Special:FormStart?tfl_formstart_pagename="+location.pathname.substr(6);    list_link.appendChild(link_text);    list_item.appendChild(list_link);    list.insertBefore(list_item, list.firstElementChild); });