V2EX无刷新加载页面

V2EX无刷新切换页面,跳转页面

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         V2EX无刷新加载页面
// @namespace    http://www.likeyun.cn/
// @version      0.1
// @description  V2EX无刷新切换页面,跳转页面
// @author       You
// @match        https://www.v2ex.com/*
// @grant        none
// @require      https://cdn.bootcdn.net/ajax/libs/instantclick/3.1.0/instantclick.min.js
/* globals jQuery, $, InstantClick,waitForKeyElements */
// ==/UserScript==

(function() {
    'use strict';
    /* 初始化InstantClick插件 */
    InstantClick.init();
    /* 隐藏InstantClick插件的加载进度条 */
    var style = document.createElement("style");
    style.type = "text/css";
    var text = document.createTextNode("#instantclick-bar{display:none;}");
    style.appendChild(text);
    var head = document.getElementsByTagName("head")[0];
    head.appendChild(style);

})();