Greasy Fork

Greasy Fork is available in English.

国际站页面跳转

一个跳转到网页底部的脚本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         国际站页面跳转
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  一个跳转到网页底部的脚本
// @author       韩冬
// @match      *://post.alibaba.com/product/*
// @icon         https://www.google.com/s2/favicons?domain=alibaba.com
// @license MIT
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var box = document.getElementById("struct-nav");
    var input = document.createElement("input");
    input.type = "button";
    input.id = "han"
    input.value = "跳转到底部"
    box.appendChild(input);
    document.getElementById("han").style.background="#fff";
    document.getElementById("han").style.borderColor = "#fffff";
    document.getElementById("han").style.border = "1px solid #1047f5";
    document.getElementById("han").style.color= "#1047f5";
    document.getElementById("han").style.display = "block";
    document.getElementById("han").style.width = "100px";
    document.getElementById("han").style.height = "32px";
    document.getElementById("han").style.borderRadius="18px";
    document.getElementById("han").style.marginTop="12px";
    document.getElementById("han").style.marginBottom="12px";
    document.getElementById("han").style.float="right";
    document.getElementById("han").onclick = function() {
        window.scrollTo(0,document.body.scrollHeight);}

})();