javascript 用户脚本:在JSBin上查看此要点

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 用户脚本:在JSBin上查看此要点相关的知识,希望对你有一定的参考价值。

// ==UserScript==
// @name         View this gist on JSBin
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       ryo
// @include      /^https?://gist\.github.com/[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}/[0-9a-f]+
// @grant        none
// ==/UserScript==

// cf. http://jsbin.com/help/import-gists
(function() {
    'use strict';

    var parent = document.getElementsByClassName('pagehead-actions')[0];
    var child = document.createElement('li');
    var a = document.createElement('a');
    a.href = 'http://jsbin.com/gist'+window.location.pathname;
    a.target = '_blank';
    a.classList.add('btn');
    a.classList.add('btn-sm');
    a.setAttribute('aria-label', 'view this gist on JSBin');
    a.textContent = 'JSBin';
    child.appendChild(a);
    parent.appendChild(child);
})();

以上是关于javascript 用户脚本:在JSBin上查看此要点的主要内容,如果未能解决你的问题,请参考以下文章

javascript jsbin - js性能示例

javascript 标题//来源https://jsbin.com/divuraj

javascript 标题//来源https://jsbin.com/zugekoy

javascript JSBin-全输出link.user.js

javascript JS Bin //来源https://jsbin.com/kanukob

javascript JS Bin //来源http://jsbin.com/qutesop