LINE Sticker Download

Add download button for line sticker store

当前为 2018-03-02 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name LINE Sticker Download
  3. // @name:zh-CN LINE Sticker Download
  4. // @namespace https://veltlion.github.io/line-sticker-download
  5. // @include https://store.line.me/stickershop/product/*
  6. // @version 1.1
  7. // @description Add download button for line sticker store
  8. // @description:zh-cn 在 LINE STORE Sticker 页面添加下载按钮
  9. // @author 空
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. var id = window.location.pathname.replace(/[^\d]/g, '');
  17. var link = 'http://dl.stickershop.line.naver.jp/products/0/0/1/' + id + '/iphone/stickers@2x.zip';
  18. var btn = '<li class="mdCMN08Li" style="list-style-type: none"><a href="' + link + '"';
  19. btn += 'class="MdBtn01 mdBtn01" style="background: #33b1ff">';
  20. btn += '<span class="mdBtn01Inner">';
  21. btn += '<span class="mdBtn01Txt">下载</span>';
  22. btn += '</span></a></li>';
  23.  
  24. $(function () {
  25. if ($("div").hasClass("mdCMN08Txt")) {
  26. // remove gift
  27. var gift = document.getElementsByClassName('mdCMN08Ul')[0];
  28. gift.removeChild(gift.firstElementChild);
  29. gift.removeChild(gift.firstElementChild);
  30. $("div.mdCMN08Txt>ul").prepend(btn);
  31. }
  32. if ($("div").hasClass("mdMN05Btn")) {
  33. $("div.mdMN05Btn").prepend(btn);
  34. }
  35. });
  36. })();