Line Append String

Automatic generation of append string

Від 01.10.2016. Дивіться остання версія.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Line Append String
// @namespace   lineappendstring
// @description Automatic generation of append string
// @include     https://store.line.me/stickershop/product/*
// @version     0.2
// @grant       none
// ==/UserScript==

title = $('.mdCMN08Ttl').text();
packID = $('.mdCMN09Image').first().css('background-image').slice($('.mdCMN09Image').first().css('background-image').search('/products/') + 10).slice(0, $('.mdCMN09Image').first().css('background-image').slice($('.mdCMN09Image').first().css('background-image').search('/products/') + 10).search('/android/')).slice($('.mdCMN09Image').first().css('background-image').slice($('.mdCMN09Image').first().css('background-image').search('/products/') + 10).slice(0, $('.mdCMN09Image').first().css('background-image').slice($('.mdCMN09Image').first().css('background-image').search('/products/') + 10).search('/android/')).lastIndexOf('/') + 1);
firstStickerID = $('.mdCMN09Image').first().attr('data-sticker-id');
basePrefix = $('.mdCMN09Image').first().css('background-image').slice(0, $('.mdCMN09Image').first().css('background-image').search('/android')).slice(0, $('.mdCMN09Image').first().css('background-image').search(location.pathname.slice(1, -3).slice(location.pathname.slice(0, -3).lastIndexOf('/'))) - 1).slice($('.mdCMN09Image').first().css('background-image').slice(0, $('.mdCMN09Image').first().css('background-image').search('/android')).slice(0, $('.mdCMN09Image').first().css('background-image').search(location.pathname.slice(1, -3).slice(location.pathname.slice(0, -3).lastIndexOf('/'))) - 1).lastIndexOf('/') + 1);
length = $('.mdCMN09Li').length.toString();
append_string = 'lineemotes.appendPack("'+title+'", '+packID+', '+firstStickerID+', '+basePrefix+', '+length+')'

console.log(append_string);
$('.mdCMN08Txt').append("<p style='background: #2e3136; padding: .2em; -webkit-border-radius: 3px; border-radius: 3px; font-family: Consolas, \"Liberation Mono\", Menlo, Courier, monospace; line-height: 16px; color: rgba(255,255,255,.7); margin: 10px 0;'>" + append_string + "</p>");