// ==UserScript== // @name tele2 api lots text view // @namespace http://tampermonkey.net/ // @version 0.2.2 // @description tele2 api lots page as text // @author // @match https://tele2.ru/api/exchange/lots?* // @icon https://www.google.com/s2/favicons?sz=64&domain=tele2.ru // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; if (document.querySelector('div[hidden="true"]')) { const obj = JSON.parse(document.querySelector('div[hidden="true"]').innerText); if (obj.data.length > 0) { let newIH = obj.data[0].volume.value + obj.data[0].volume.uom + ' ' + obj.data[0].cost.amount + '\n\n'; if (obj.data.length > 5) { obj.data[5].id = '\n' + obj.data[5].id; }; newIH += '
' + key.id + ' | ' + (key.my?'t2bot ':'') + key.seller.name + ' ' + key.seller.emojis + '\n';
};
if (window.trustedTypes && window.trustedTypes.createPolicy) {
window.trustedTypes.createPolicy('default', {
createHTML: (string, sink) => string
});
}
document.body.innerHTML = '' + newIH + '' } else document.body.innerText = 'no lots'; }; })(); |