amarullz

CSGO Float Script - Tampermonkey

Mar 29th, 2017
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Steam Inspect
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        https://bitskins.com/*
  8. // @include      https://opskins.com/*
  9. // @include      https://skin.trade/*
  10. // @include      https://steamcommunity.com/*
  11. // @grant        GM_xmlhttpRequest
  12. // ==/UserScript==
  13.  
  14. (function() {
  15.     'use strict';
  16.     function steamChecker(e){
  17.         if (true){
  18.             var r=e.path[0];
  19.             var kt=r.getElementsByClassName('__tm_float_val');
  20.             if (kt.length>0){
  21.                 return true;
  22.             }
  23.             for (var i=0;i<e.path.length,i<5;i++){
  24.                 var p=e.path[i];
  25.                 if (p.tagName=='A'){
  26.                     if (p.href.indexOf('steam://')==0){
  27.                         GM_xmlhttpRequest({
  28.                             method: "GET",
  29.                             url: 'https://api.csgofloat.com:1738/?url='+p.href,
  30.                             onload: function(response) {
  31.                                 var cvalues='';
  32.                                 eval('cvalues='+response.responseText);
  33.                                 if (cvalues){
  34.                                     kt=document.createElement('span');
  35.                                     kt.className='__tm_float_val';
  36.                                     kt.style.fontSize='10px';
  37.                                     kt.style.background='#000';
  38.                                     kt.style.color='#fff';
  39.                                     kt.style.display='inline-block';
  40.                                     kt.style.paddingLeft='2px';
  41.                                     kt.style.paddingRight='4px';
  42.                                     kt.style.lineHeight='12px';
  43.                                     kt.style.paddingLeft='6px';
  44.                                     kt.style.borderRadius='6px';
  45.                                     kt.style.zIndex='999999';
  46.                                     kt.style.position='relative';
  47.                                     r.appendChild(kt);
  48.                                     p.setAttribute('title','FLOAT: '+cvalues.iteminfo.floatvalue);
  49.                                     kt.innerHTML=(cvalues.iteminfo.floatvalue+"").substring(0,5);
  50.                                     console.log(cvalues.iteminfo);
  51.                                 }
  52.                             }
  53.                         });
  54.                         e.preventDefault();
  55.                         e.stopPropagation();
  56.                         return false;
  57.                     }
  58.                 }
  59.             }
  60.         }
  61.         return true;
  62.     }
  63.     document.addEventListener("contextmenu", steamChecker);
  64. })();
Advertisement
Add Comment
Please, Sign In to add comment