User:Irukaza/common.js:修订间差异

跳到导航 跳到搜索
删除230字节 、​ 2021年3月30日 (星期二)
无编辑摘要
imported>=海豚=
无编辑摘要
imported>=海豚=
无编辑摘要
第9行: 第9行:
/* eslint-disable comma-dangle */
/* eslint-disable comma-dangle */
/* eslint-disable no-var */
/* eslint-disable no-var */
// eslint-disable-next-line no-redeclare
/* global $, mw, localforage*/
/* global $, mw, localforage */
"use strict";
"use strict";
$(function () {
$(function () {
第54行: 第53行:
          }));
          }));
        };
        };
        var logoPic = "https://www.hmoegirl.com/images/b/bc/Hmoegirl_logo.png"; 
        var logoPic = "https://www.hmoegirl.com/images/b/bc/Hmoegirl_logo.png";
        var arrowRightSvg = generateImageObject('<svg version="1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" enable-background="new 0 0 48 48"><polygon fill="#2196F3" points="17.1,5 14,8.1 29.9,24 14,39.9 17.1,43 36,24"/></svg>');
        var arrowRightSvg = generateImageObject('<svg version="1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" enable-background="new 0 0 48 48"><polygon fill="#2196F3" points="17.1,5 14,8.1 29.9,24 14,39.9 17.1,43 36,24"/></svg>');
        var arrowLeftSvg = generateImageObject('<svg version="1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" enable-background="new 0 0 48 48"><polygon fill="#2196F3" points="30.9,43 34,39.9 18.1,24 34,8.1 30.9,5 12,24"/></svg>');
        var arrowLeftSvg = generateImageObject('<svg version="1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" enable-background="new 0 0 48 48"><polygon fill="#2196F3" points="30.9,43 34,39.9 18.1,24 34,8.1 30.9,5 12,24"/></svg>');
第65行: 第64行:
          src: logoPic
          src: logoPic
        });
        });
        var $arrow = $("<span>").attr("id", "sidebarHidden-arrow");
        var $arrow = $("<img>").attr({
       var $arrowLeft = $("<img>").attr({
          id: "sidebarHidden-arrow",
          id: "sidebarHidden-arrow-left",
          src: arrowLeftSvg
          src: arrowLeftSvg
        });
        });
       var $arrowRight = $("<img>").attr({
         id: "sidebarHidden-arrow-right",
         src: arrowRightSvg
       });
       $arrow.append($arrowLeft).append($arrowRight);
        $logoLink.empty().removeAttr("class").attr("id", "sidebarHidden-logo-link").append($logo);
        $logoLink.empty().removeAttr("class").attr("id", "sidebarHidden-logo-link").append($logo);
        var hide = function () {
        var hide = function () {
第83行: 第76行:
          saving = true;
          saving = true;
          $body.addClass("sidebarHidden");
          $body.addClass("sidebarHidden");
         $arrow.attr("src", arrowRightSvg);
          store.setItem("hidden", hidden).then(function () {
          store.setItem("hidden", hidden).then(function () {
            saving = false;
            saving = false;
第94行: 第88行:
          hidden = false;
          hidden = false;
          $body.removeClass("sidebarHidden");
          $body.removeClass("sidebarHidden");
         $arrow.attr("src", arrowLeftSvg);
          store.setItem("hidden", hidden).then(function () {
          store.setItem("hidden", hidden).then(function () {
            saving = false;
            saving = false;
匿名用户

导航菜单