LINE Sticker Download

Add download button for line sticker store

目前為 2018-03-02 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name            LINE Sticker Download
// @name:zh-CN      LINE Sticker Download
// @namespace       https://veltlion.github.io/line-sticker-download
// @include         https://store.line.me/stickershop/product/*
// @version         1.1
// @description     Add download button for line sticker store
// @description:zh-cn  在 LINE STORE Sticker 页面添加下载按钮
// @author          空
// @grant           none
// ==/UserScript==

(function() {
    'use strict';

    var id = window.location.pathname.replace(/[^\d]/g, '');
    var link = 'http://dl.stickershop.line.naver.jp/products/0/0/1/' + id + '/iphone/[email protected]';
    var btn = '<li class="mdCMN08Li" style="list-style-type: none"><a href="' + link + '"';
    btn += 'class="MdBtn01 mdBtn01" style="background: #33b1ff">';
    btn += '<span class="mdBtn01Inner">';
    btn += '<span class="mdBtn01Txt">下载</span>';
    btn += '</span></a></li>';

    $(function () {
        if ($("div").hasClass("mdCMN08Txt")) {
            // remove gift
            var gift = document.getElementsByClassName('mdCMN08Ul')[0];
            gift.removeChild(gift.firstElementChild);
            gift.removeChild(gift.firstElementChild);
            $("div.mdCMN08Txt>ul").prepend(btn);
        }
        if ($("div").hasClass("mdMN05Btn")) {
             $("div.mdMN05Btn").prepend(btn);
        }
    });
})();