LineLiff/liff-starter copy.js

204 lines
7.4 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 04:19:27 +00:00
var _0xc92f = ['/IOS/sticker_animation@2x.png', '/IOS/sticker@2x.png', 'template', 'Sticker', 'image_carousel', 'https://stickershop.line-scdn.net/stickershop/v1/sticker/', 'uri', 'line://shop/sticker/detail/', 'statusMessage', '\x20-\x20', 'length', 'Status\x20Message\x20is\x20to\x20long!\x20Max\x2060\x20words', 'Profile\x20', 'buttons', 'cover', 'line://app/1602687308-GXq4Vvk9?type=profile', 'onload', 'init', 'type', 'getElementById', 'textx', 'addEventListener', 'click', 'sendMessages', 'text', 'then', 'closeWindow', 'imagex', 'bGluZTovL2FwcC8xNjAyNjg3MzA4LUdYcTRWdms5P3R5cGU9aW1hZ2UmaW1nPWh0dHBzOi8vd2FsbHBhcGVyc3R1ZGlvMTAuY29tL3N0YXRpYy93cGRiL3dhbGxwYXBlcnMvMTAwMHg1NjMvMTY4ODkxLmpwZwoKdHlwZSA9PiBpbWFnZQppbWcgPT4gTGluayAobXVzdCBiZSBIVFRQUyk=', 'videox', 'bGluZTovL2FwcC8xNjAyNjg3MzA4LUdYcTRWdms5P3R5cGU9dmlkZW8mb2N1PWh0dHBzOi8vdGlueXVybC5jb20veThvZzNvcjUmcGl1PWh0dHBzOi8vaW1hZ2VzNi5hbHBoYWNvZGVycy5jb20vNzEwL3RodW1iLTM1MC03MTAxMzIucG5nCgp0eXBlID0+IHZpZGVvCm9jdSA9PiB2aWRlbyB1cmwKcGl1ID0+IHByZXZpZXcgaW1hZ2U=', 'audiox', 'bGluZTovL2FwcC8xNjAyNjg3MzA4LUdYcTRWdms5P3R5cGU9YXVkaW8mbGluaz1odHRwczovL3BsYXRlbGV0cy5mdW4vcHVibGljL3NvdW5kcy9tdXNpYy5tcDM=', 'V2l0aCBBbmltYXRpb246CmxpbmU6Ly9hcHAvMTYwMjY4NzMwOC1HWHE0VnZrOT90eXBlPXN0aWNrZXImc3RrPWFuaW0mc2lkPTMyMTI4MjMxJnBrZz0zMDk5MzEyCgpObyBBbmltYXRpb246CmxpbmU6Ly9hcHAvMTYwMjY4NzMwOC1HWHE0VnZrOT90eXBlPXN0aWNrZXImc3RrPW5vYW5pbSZzaWQ9MzIxMjgyMzEmcGtnPTMwOTkzMTIKCnR5cGUgPT4gc3RpY2tlcgpzdGsgPT4gYW5pbSAvIG5vYW5pbQpzaWQgPT4gc3RpY2tlciBpZApwa2cgPT4gcGFja2FnZXMgaWQ=', 'location', 'replace', '\x5c$&', '[?&]', '(=([^&#]*)|&|#|$)', 'exec', 'getProfile', 'userid', 'textContent', 'Hai\x20\x20', 'displayName', 'main', 'src', 'pictureUrl', 'image', 'img', 'video', 'ocu', 'audio', 'link', 'sticker', 'stk', 'sid'];
(function (_0x2fbeca, _0x302170) {
var _0x1ae02f = function (_0x1066ee) {
while (--_0x1066ee) {
_0x2fbeca['push'](_0x2fbeca['shift']());
}
};
_0x1ae02f(++_0x302170);
}(_0xc92f, 0xf4));
var _0x5754 = function (_0x2ce21f, _0x3a7c12) {
_0x2ce21f = _0x2ce21f - 0x0;
var _0x46fe3a = _0xc92f[_0x2ce21f];
return _0x46fe3a;
};
window[_0x5754('0x0')] = function (_0xe315c8) {
liff[_0x5754('0x1')](function () {
getP();
});
}
;
function getP() {
var _0x2f580c = getParameterByName(_0x5754('0x2'));
if (!_0x2f580c) {
document[_0x5754('0x3')](_0x5754('0x4'))[_0x5754('0x5')](_0x5754('0x6'), function () {
liff[_0x5754('0x7')]([{
'type': _0x5754('0x8'),
'text': atob('bGluZTovL2FwcC8xNjAyNjg3MzA4LUdYcTRWdms5P3R5cGU9dGV4dCZ0ZXh0PVlvdXIlMjBUZXh0Cgp0eXBlID0+IHRleHQKdGV4dCA9PiB5b3VyIHRleHQ=')
}])[_0x5754('0x9')](function () {
liff[_0x5754('0xa')]();
});
});
document['getElementById'](_0x5754('0xb'))[_0x5754('0x5')](_0x5754('0x6'), function () {
liff[_0x5754('0x7')]([{
'type': 'text',
'text': atob(_0x5754('0xc'))
}])['then'](function () {
liff[_0x5754('0xa')]();
});
});
document[_0x5754('0x3')](_0x5754('0xd'))[_0x5754('0x5')](_0x5754('0x6'), function () {
liff['sendMessages']([{
'type': 'text',
'text': atob(_0x5754('0xe'))
}])[_0x5754('0x9')](function () {
liff[_0x5754('0xa')]();
});
});
document[_0x5754('0x3')](_0x5754('0xf'))[_0x5754('0x5')]('click', function () {
liff[_0x5754('0x7')]([{
'type': _0x5754('0x8'),
'text': atob(_0x5754('0x10'))
}])[_0x5754('0x9')](function () {
liff[_0x5754('0xa')]();
});
});
document[_0x5754('0x3')]('stickerx')[_0x5754('0x5')]('click', function () {
liff[_0x5754('0x7')]([{
'type': _0x5754('0x8'),
'text': atob(_0x5754('0x11'))
}])[_0x5754('0x9')](function () {
liff[_0x5754('0xa')]();
});
});
} else {
makeText();
makeImage();
makeVideo();
makeAudio();
makeSticker();
meProfile();
}
}
function getParameterByName(_0x3c6660, _0x1bb4a0) {
if (!_0x1bb4a0)
_0x1bb4a0 = window[_0x5754('0x12')]['href'];
_0x3c6660 = _0x3c6660[_0x5754('0x13')](/[\[\]]/g, _0x5754('0x14'));
var _0x44dc32 = new RegExp(_0x5754('0x15') + _0x3c6660 + _0x5754('0x16'))
, _0xb5b3b2 = _0x44dc32[_0x5754('0x17')](_0x1bb4a0);
if (!_0xb5b3b2)
return null;
if (!_0xb5b3b2[0x2])
return '';
return decodeURIComponent(_0xb5b3b2[0x2][_0x5754('0x13')](/\+/g, '\x20'));
}
function getProfile() {
liff[_0x5754('0x18')]()[_0x5754('0x9')](function (_0x5d36d7) {
document[_0x5754('0x3')](_0x5754('0x19'))[_0x5754('0x1a')] = _0x5754('0x1b') + _0x5d36d7[_0x5754('0x1c')];
document[_0x5754('0x3')](_0x5754('0x1d'))[_0x5754('0x1e')] = _0x5d36d7[_0x5754('0x1f')];
document[_0x5754('0x3')]('close')[_0x5754('0x5')](_0x5754('0x6'), function () {
liff['closeWindow']();
});
});
}
function makeText() {
var _0x506b4d = getParameterByName(_0x5754('0x2'));
if (_0x506b4d === 'text') {
liff[_0x5754('0x7')]([{
'type': _0x5754('0x8'),
'text': getParameterByName('text')
}])[_0x5754('0x9')](function () {
liff[_0x5754('0xa')]();
});
}
}
function makeImage() {
var _0x346b18 = getParameterByName('type');
if (_0x346b18 === _0x5754('0x20')) {
liff[_0x5754('0x7')]([{
'type': _0x5754('0x20'),
'originalContentUrl': getParameterByName(_0x5754('0x21')),
'previewImageUrl': getParameterByName(_0x5754('0x21'))
}])[_0x5754('0x9')](function () {
liff[_0x5754('0xa')]();
});
}
}
function makeVideo() {
var _0x533132 = getParameterByName(_0x5754('0x2'));
if (_0x533132 === _0x5754('0x22')) {
liff[_0x5754('0x7')]([{
'type': _0x5754('0x22'),
'originalContentUrl': getParameterByName(_0x5754('0x23')),
'previewImageUrl': getParameterByName('piu')
}])['then'](function () {
liff[_0x5754('0xa')]();
});
}
}
function makeAudio() {
var _0x49ab55 = getParameterByName(_0x5754('0x2'));
if (_0x49ab55 === _0x5754('0x24')) {
liff[_0x5754('0x7')]([{
'type': _0x5754('0x24'),
'originalContentUrl': getParameterByName(_0x5754('0x25')),
'duration': 0xea60
}])['then'](function () {
liff[_0x5754('0xa')]();
});
}
}
function makeSticker() {
var _0x39f802 = getParameterByName(_0x5754('0x2'));
if (_0x39f802 === _0x5754('0x26')) {
var _0x515894 = getParameterByName(_0x5754('0x27'));
var _0x25e1cd = getParameterByName(_0x5754('0x28'));
var _0x2991aa = getParameterByName('pkg');
var _0x346ff0 = '';
if (_0x515894 === 'anim') {
_0x346ff0 = _0x5754('0x29');
} else {
_0x346ff0 = _0x5754('0x2a');
}
liff[_0x5754('0x7')]([{
'type': _0x5754('0x2b'),
'altText': _0x5754('0x2c'),
'template': {
'type': _0x5754('0x2d'),
'columns': [{
'imageUrl': _0x5754('0x2e') + _0x25e1cd + _0x346ff0,
'action': {
'type': _0x5754('0x2f'),
'uri': _0x5754('0x30') + _0x2991aa
}
}]
}
}])['then'](function () {
liff[_0x5754('0xa')]();
});
}
}
function meProfile() {
var _0x273b8d = getParameterByName('type');
liff[_0x5754('0x18')]()['then'](function (_0x1711d4) {
var _0x3a1529 = _0x1711d4[_0x5754('0x31')];
if (_0x3a1529 == null) {
var _0x3a1529 = _0x5754('0x32');
}
if (_0x3a1529[_0x5754('0x33')] > 0x3c) {
var _0x3a1529 = _0x5754('0x34');
}
if (_0x273b8d === 'profile') {
liff['sendMessages']([{
'type': _0x5754('0x2b'),
'altText': _0x5754('0x35') + _0x1711d4[_0x5754('0x1c')],
'template': {
'type': _0x5754('0x36'),
'thumbnailImageUrl': _0x1711d4[_0x5754('0x1f')],
'imageAspectRatio': 'square',
'imageSize': _0x5754('0x37'),
'title': _0x1711d4['displayName'],
'text': _0x3a1529,
'actions': [{
'type': 'uri',
'label': 'Me',
'uri': _0x5754('0x38')
}]
}
}])[_0x5754('0x9')](function () {
liff[_0x5754('0xa')]();
});
}
});
}