iconfont_iOS

icon font unicode for iOS

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        iconfont_iOS
// @description icon font unicode for iOS
// @namespace   https://github.com/chenshengzhi
// @include     *www.iconfont.cn/*
// @version     0.0.1
// @require     http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js
// @grant       none
// ==/UserScript==

var btn = document.createElement("input");
btn.type = "button";
btn.value = "iOS";
btn.style.position = 'fixed';
var top = '30px';
btn.style.top = top;
btn.style.right = '30px';
btn.style.width = '60px';
btn.style.height = '60px';
btn.style.backgroundColor = '#208F72';
btn.style.borderStyle = 'none';
btn.style.borderRadius = '30px';
btn.style.color = 'white';
btn.style.fontSize = '16px';
btn.onclick = function (){
    var lists = $("ul.font-lists").children("li").children(".unicode");
    lists.each(function(){
        var normalUnicode = $(this).html().replace("&", '&');
        console.log(normalUnicode);
        var index = normalUnicode.indexOf("#x") + 2;
        var temp = normalUnicode.substr(index);
        temp = temp.substr(0, temp.length-1);
        for (var i = temp.length; i < 8; i = temp.length) {
            temp = '0' + temp;
        }
        var newUnicode = "\\U" + temp;
        console.log(newUnicode);
        $(this).html(newUnicode);
    });

    var lists = $("ul.font-lists").children("li");
    lists.each(function(){
        var unicode = $(this).children(".unicode").html();
        $(this).children(".name").attr("data-clipboard-text", unicode);
    });
};
document.body.appendChild(btn);