Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chrome.runtime.onMessage.addListener(
- function(request, sender, sendResponse) {
- if (request.contentScriptQuery == "queryPrice") {
- var url = "https://pixelboii.wtf/steamvalue.json";
- var skinFullName = request.itemURL;
- fetch(url)
- .then(res => res.json())
- .then(price => {
- sendResponse(price.items_list[skinFullName].price["7_days"].average);
- })
- .catch(err => { throw err });
- return true; // Will respond asynchronously.
- }
- });
Add Comment
Please, Sign In to add comment