您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto view ipython notebook file in github with nbviewer
// ==UserScript== // @name NotebookAutoViewer // @namespace https://greasyfork.org/scripts/370056/ // @version 0.1.2 // @description Auto view ipython notebook file in github with nbviewer // @author Yixian Du // @match https://*.github.com/*.ipynb // @license The MIT License (MIT); http://opensource.org/licenses/MIT // @grant none // ==/UserScript== var view = function() { 'use strict'; if (location.pathname.endsWith('.ipynb')){ location.assign('https://nbviewer.jupyter.org/github' + location.pathname); } }; function create_view_button() { var viewer = document.createElement('span'); viewer.innerText = 'View'; viewer.style.color = 'red'; viewer.addEventListener('click', view, false ); var path = document.getElementsByClassName('final-path')[0]; path.parentElement.appendChild(viewer); }; create_view_button();