unicorn

there's jquery everywhere ¯\_(ツ)_/¯

目前為 2017-01-24 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         unicorn
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  there's jquery everywhere ¯\_(ツ)_/¯
// @author       justrunmyscripts
// @require      https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @match        */*
// @grant        none
// @run-at       document-end
// @noframes
// ==/UserScript==
(function($) {
    'use strict';

    console.log('unicorn is running! (tampermonkey script!)');
    $('h1,h2,h3,h4,h5,h6,p,i,b,a,ul,li,blockquote,hr,div,ins,strong,em,span,' +
      'abbr,address,area,article,aside,base,big,button,canvas,caption,cite,code,' +
      'col,colgroup,command,dd,del,details,dir,dl,dt,embed,fieldset,figcaption,figure,' +
      'font,footer,form,frame,head,hr,html,body,i,iframe,input,ins,label,legend,link,map,' +
      'mark,menu,meta,meter,nav,noframes,noscript,object,ol,option,q,s,rp,rt,ruby,samp,section,' +
      'select,source,strike,style,sub,summary,sup,table,tbody,td,textarea,th,thead,time,' +
      'title,tr,track,tt,u,ul,var').not(':has(*)').each((index, element )=>{
        var thestring = $(element).html();
        try {
            $(element).html(thestring.replace(/unicode/gi, 'unicorn'));
        }
        catch (err) {
            console.log('ERROR: ', err);
        }
    });

}).bind(this)(jQuery);