8000 catmjs/index.html at master · fzeeshan/catmjs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"coin.ino","path":"coin.ino","contentType":"directory"},{"name":"fonts","path":"fonts","contentType":"directory"},{"name":"images","path":"images","contentType":"directory"},{"name":"node_modules","path":"node_modules","contentType":"directory"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"accounting.min.js","path":"accounting.min.js","contentType":"file"},{"name":"html5-qrcode.js","path":"html5-qrcode.js","contentType":"file"},{"name":"html5-qrcode.min.js","path":"html5-qrcode.min.js","contentType":"file"},{"name":"index.html","path":"index.html","contentType":"file"},{"name":"jquery-1.11.3.min.js","path":"jquery-1.11.3.min.js","contentType":"file"},{"name":"jquery-2.1.4.min.js","path":"jquery-2.1.4.min.js","contentType":"file"},{"name":"jsqrcode-combined.min.js","path":"jsqrcode-combined.min.js","contentType":"file"},{"name":"package.json","path":"package.json","contentType":"file"},{"name":"serialport.node","path":"serialport.node","contentType":"file"}],"totalCount":14}},"fileTreeProcessingTime":6.3167409999999995,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":147294129,"defaultBranch":"master","name":"catmjs","ownerLogin":"fzeeshan","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-09-04T05:46:00.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/13985192?v=4","public":true,"private":false,"isOrgOwned":false},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1618813580.39671","canEdit":false,"refType":"branch","currentOid":"41801d13fd972f49d54794f33c8386ac08e3eff8"},"path":"index.html","currentUser":null,"blob":{"rawLines":["\u003c!DOCTYPE html\u003e","\u003chtml\u003e"," \u003chead\u003e"," \u003cscript src=\"jquery-1.11.3.min.js\"\u003e\u003c/script\u003e"," \u003cscript src=\"accounting.min.js\"\u003e\u003c/script\u003e"," \u003cscript src=\"jsqrcode-combined.min.js\"\u003e\u003c/script\u003e"," \u003cscript src=\"html5-qrcode.js\"\u003e\u003c/script\u003e"," \u003cscript\u003e"," currentBalance = 1"," var serialport = require('serialport');"," var SerialPort = serialport.SerialPort;"," var sp = new SerialPort(\"/dev/ttyACM0\", {"," baudrate: 9600,"," parser: serialport.parsers.readline('\\r\\n')"," });"," sp.on(\"open\", function () {"," console.log('open');"," sp.on('data', function(data) {"," currentBalance = parseInt(currentBalance) + parseInt(data);"," $(\"#currentBalance\").html(accounting.formatMoney(currentBalance));"," balanceUP();"," });"," });",""," var ticker;"," var recent;"," var markup;"," var selCoin;"," var qrcode;"," var bitcoinpayurl=\"\u003cYour BitCoin Pay Address Here\u003e\";"," var altcoinpayurl=\"\u003cYour Altcoin Pay Address Here\u003e\";"," paykey=\"\u003cPut Pay Key Here From Your Server\u003e\";"," var com;"," var curAmount;"," var stopper;"," function reset() {"," $( \"#coinInfo\" ).hide();"," $( \"#loading\" ).hide();"," $( \"#selectCoin\" ).show();"," $( \"#getQR\" ).hide();"," $( \"#gotQR\" ).hide();"," $( \"#complete\" ).hide();"," $( \"#allsettings\" ).hide();"," $( \"#right\" ).show();"," currentBalance=0;"," $(\"#currentBalance\").html(accounting.formatMoney(currentBalance));"," balanceUP();"," }"," function mainScreen() {"," try {"," $('#reader').html5_qrcode_stop();"," $('#qr-canvas').remove();"," $('#video').remove();"," } catch(err) {"," console.log(\"Video Not On\");"," }"," clearInterval(ticker);"," //sleep(1000);"," $( \"#coinInfo\" ).hide();"," $( \"#loading\" ).hide();"," $( \"#selectCoin\" ).show();"," $( \"#getQR\" ).hide();"," $( \"#gotQR\" ).hide();"," $( \"#complete\" ).hide();"," $( \"#allsettings\" ).hide();"," $(\"#currentBalance\").html(accounting.formatMoney(currentBalance));"," }"," $( document ).ready(function() {"," reset();"," $( \"#completed\" ).hide();"," //setInterval(checkBalance,1000);"," });",""," function checkBalance() {"," if (curAmount \u003e 0) {"," $( \"#right\").hide();"," } else {"," $( \"#right\").show();"," }"," }",""," function printWallet(coin) {"," var sys = require('sys')"," var exec = require('child_process').exec;"," var child;"," child = exec(\"gen.sh\", function (error, stdout, stderr) {"," sys.print('stdout: ' + stdout);"," sys.print('stderr: ' + stderr);"," if (error !== null) {"," console.log('exec error: ' + error);"," }"," });"," }",""," function selectCoin(coin) {"," $( \"#selectCoin\" ).hide();"," $( \"#coinSelected\" ).text(capital(coin));"," selCoin=coin;"," //getcoinprice"," //https://blockchain.info/ticker"," //show loading on the screen"," $( \"#loading\" ).show();"," if (coin == \"bitcoin\") {"," getCoinPriceBTC(true);"," ticker = setInterval(function(){ getCoinPriceBTC(false) }, 3000);"," }"," if (coin == \"litecoin\") {"," getCoinPriceLTC(true);"," ticker = setInterval(function(){ getCoinPriceLTC(false) }, 3000);"," }"," if (coin == \"dogecoin\") {"," getCoinPriceDoge(true);"," ticker = setInterval(function(){ getCoinPriceDoge(false) }, 3000);"," }"," }"," function getCoinPriceDoge(firstload) {"," $.get( \"http://data.bter.com/api/1/ticker/doge_usd\", function( data ) {"," usd = data[\"avg\"];"," recent = data[\"avg\"];"," orig_usd = usd;"," usd = (usd * .01);"," amount_per = Math.round((usd * .01)*100/100) + usd;"," total = currentBalance/amount_per;"," total = total - 0.00001000;"," if (total \u003c 0) {"," total = 0;"," }"," curAmount = total;"," $(\"#amount_per\").text(accounting.formatMoney(total,\"$\",8));"," $(\"#currentPrice\").text(accounting.formatMoney(amount_per,\"$\",8));"," if (!firstload) {"," $( \"#loading\" ).hide();"," if (currentBalance \u003c=0) {"," $( \"#buynow\" ).hide();"," $( \"#cancelonly\" ).show();"," }"," $( \"#coinInfo\" ).show();"," }"," });"," }",""," function getCoinPriceBTC(firstload) {"," $.get( \"https://blockchain.info/ticker\", function( data ) {"," usd = data.USD.last;"," recent = data.USD.last;"," orig_usd = usd;"," usd = (usd * .01);"," amount_per = Math.round((data.USD.last * .01)*100/100) + data.USD.last;"," //amount_per = orig_usd - usd;"," total = currentBalance/amount_per;"," total = total - 0.00001000;"," if (total \u003c 0) {"," total = 0;"," }"," curAmount = total;",""," $(\"#amount_per\").text(accounting.formatMoney(total,\"$\",8));"," $(\"#currentPrice\").text(accounting.formatMoney(amount_per));"," if (!firstload) {"," $( \"#loading\" ).hide();"," if (currentBalance \u003c=0) {"," $( \"#buynow\" ).hide();"," $( \"#cancelonly\" ).show();"," }"," $( \"#coinInfo\" ).show();"," }"," });"," }",""," function getCoinPriceLTC(firstload) {"," $.getJSON( \"https://btc-e.com/api/3/ticker/ltc_usd\", function( data ) {"," var json = data;"," usd = json[\"ltc_usd\"][\"avg\"];"," recent = json[\"ltc_usd\"][\"avg\"];"," orig_usd = usd;"," usd = (usd * .01);"," amount_per = Math.round((usd * .01)*100/100) + usd;"," total = currentBalance/amount_per;"," total = total - 0.00001000;"," if (total \u003c 0) {"," total = 0;"," }"," curAmount = total;"," $(\"#amount_per\").text(accounting.formatMoney(total,\"$\",8));"," $(\"#currentPrice\").text(accounting.formatMoney(amount_per));"," if (!firstload) {"," $( \"#loading\" ).hide();"," if (currentBalance \u003c=0) {"," $( \"#buynow\" ).hide();"," $( \"#cancelonly\" ).show();"," }"," $( \"#coinInfo\" ).show();"," }"," });"," }"," function balanceUP() {"," if (currentBalance \u003e 0) {"," $(\"#right\").hide();"," } else {"," $(\"#right\").show();"," }"," //console.log(recent);"," usd = markup;"," orig_usd = markup;"," usd = (usd * .10);"," amount_per = orig_usd - usd;"," total = currentBalance/amount_per;"," total = total - 0.00001000;"," if (total \u003c 0) {"," total = 0;"," }"," curAmount = total;"," $(\"#amount_per\").text(accounting.formatMoney(total,\"$\",8));"," if (currentBalance \u003e0) {"," $( \"#buynow\" ).show();"," $( \"#cancelonly\" ).hide();"," }"," }"," function capital(string) {"," return string.charAt(0).toUpperCase() + string.slice(1);"," }"," function buyNow() {"," $(\"#coinInfo\").hide();"," clearInterval(ticker);"," //let some cleanup happen"," //sleep(1000);"," //hide shit."," $(\"#coinInfo\").hide();"," $(\"#getQR\").show();"," console.log(\"Buying \" + selCoin);"," readNow();"," }"," function stopReading() {"," console.log(\"Stop\");"," $('#reader').html5_qrcode_stop();"," clearInterval(stopper);"," }"," function settings() {"," var os = require('os');"," var ifaces = os.networkInterfaces();"," var addresses = \"\";"," Object.keys(ifaces).forEach(function (ifname) {"," var alias = 0;"," ifaces[ifname].forEach(function (iface) {"," if ('IPv4' !== iface.family || iface.internal !== false) {"," return;"," }"," if (alias \u003e= 1) {"," addresses += ifname + ':' + alias + iface.address + \"\u003cbr /\u003e\";"," } else {"," addresses += ifname + ' ' + iface.address + \"\u003cbr /\u003e\";"," }"," ++alias;"," });"," "," });"," $(\"#ipaddress\").html(addresses); "," clearInterval(ticker);"," $( \"#selectCoin\" ).hide();"," $( \"#allsettings\" ).show();"," }"," function readNow() {"," reading = 1;"," $('#reader').html5_qrcode(function(qrdata){"," console.log(\"Starting Read: \" + qrdata);"," qr = qrdata;"," $(\"#getQR\").hide();"," "," var res = qr.split(\":\");"," console.log(\"Res[0]: \" + res[0] +\" Res[1]:\" +res[1] + \" QR:\" + qr);"," $(\"#tqrcode\").text(res[1]);"," tqrcode=res[1];"," $(\"#gotQR\").show();"," stopper = setInterval(function(){stopReading()}, 100);"," },"," function(error){"," console.log(\"Err: \" + error);"," }, function(videoError){"," console.log(\"vErr: \" + videoError);"," });"," }",""," function hideCompleted() {"," $(\"#completed\").hide();"," //$(\"#container\").show();"," clearInterval(com);"," //reset();"," location.reload();"," }"," function showCompleted() {"," //let's hide the containter too"," $(\"#container\").hide();"," $(\"#completed\").show();"," com = setInterval(function(){hideCompleted()}, 5000);"," }"," function completePurchase() {"," //qrcode=\"2NAqo6t124UY3Kg5acGPzDDnJGSmsULtg14\";"," if (selCoin == \"bitcoin\") {"," url=\"https://\"+bitcoinpayurl+\"/api.php?key=\"+paykey+\"\u0026command=sendFrom\u0026qr=\"+tqrcode+\"\u0026amount=\"+curAmount+\"\u0026type=\"+selCoin;"," } else {"," url=\"https://\"+altcoinpayurl+\"/api.php?key=\"+paykey+\"\u0026command=sendFrom\u0026qr=\"+tqrcode+\"\u0026amount=\"+curAmount+\"\u0026type=\"+selCoin;"," }"," $.get( url, function( data ) {"," $(\"#gotQR\").hide();"," showCompleted();"," });"," console.log(\"https://\"+bitcoinpayurl+\"/api.php?key=\"+paykey+\"\u0026command=sendFrom\u0026qr=\"+tqrcode+\"\u0026amount=\"+curAmount+\"\u0026type=\"+selCoin);"," //$(\"#gotQR\").hide();"," //showCompleted();","",""," }"," function sleep(milliseconds) {"," var start = new Date().getTime();"," for (var i = 0; i \u003c 1e7; i++) {"," if ((new Date().getTime() - start) \u003e milliseconds){"," break;"," }"," }"," }","","","",""," \u003c/script\u003e"," \u003ctitle\u003eCoin ATM\u003c/title\u003e"," \u003clink rel=\"stylesheet\" href=\"fonts/css/hack.min.css\"\u003e"," \u003cstyle\u003e"," html {"," background:#000 url(images/background.png);"," background-size:cover;"," }"," body {"," font-family: Hack, monospace;"," text-transform:uppercase;"," color:#FFF;"," }"," h1 {"," font-size: 1.4em;"," margin:15px auto 0px auto;"," text-align: center;"," font-weight: normal;"," padding: 0;"," text-transform:uppercase;"," }"," #container{width:100%;}"," #left{float:left;width:200px;}"," #right{float:right;width:200px;}"," #center{margin:0 auto;width:100px;}"," .noselect {"," -webkit-touch-callout: none;"," -webkit-user-select: none;"," -khtml-user-select: none;"," -moz-user-select: none;"," -ms-user-select: none;"," user-select: none;"," }"," .button {"," width:400px;"," height:70px;"," margin:0px auto 15px auto;"," background: #EEE;"," text-align: center;"," line-height: 110px;"," border-radius: 5px;"," }"," .button:last-child {"," margin:0px auto 0px auto;"," }"," .button img {"," max-width:260px;"," max-height:60px;"," }"," .center-div {"," text-align: center;"," margin-top: 150px;"," }"," \u003c/style\u003e"," \u003c/head\u003e"," \u003cbody class=\"noselect\"\u003e"," \u003cdiv align=\"center\" id=\"completed\"\u003eThe Transaction is complete!\u003c/div\u003e"," \u003cdiv id=\"container\"\u003e"," \u003cdiv id=\"left\"\u003eBalance \u003cspan id=\"currentBalance\"\u003e\u003c/span\u003e\u003c/div\u003e"," \u003cdiv id=\"right\" align=\"right\"\u003ePlease Insert USD\u003c/div\u003e"," \u003c/div\u003e\u003cbr /\u003e\u003cbr /\u003e"," \u003cdiv id=\"selectCoin\"\u003e"," \u003ch1\u003eSelect A Currency To Purchase\u003c/h1\u003e\u003cbr /\u003e"," \u003cdiv class=\"button\" "selectCoin('bitcoin')\"\u003e\u003cimg src=\"images/bitcoin_logo.png\"\u003e\u003c/div\u003e"," \u003cdiv class=\"button\" "selectCoin('litecoin')\"\u003e\u003cimg src=\"images/litecoin_logo.png\"\u003e\u003c/div\u003e"," \u003cdiv class=\"button\" "selectCoin('dogecoin')\"\u003e\u003cimg src=\"images/dogecoin_logo.png\"\u003e\u003c/div\u003e"," \u003cdiv style=\"position:absolute;bottom:0;right:0;\" "settings()\"\u003e\u003cimg src=\"images/gear.png\"\u003e\u003c/div\u003e "," \u003c!--\u003cdiv class=\"button\" "scanCode();\"\u003eScan Code\u003c/div\u003e--\u003e"," \u003c!--\u003cdiv class=\"button\" "printWallet('bitcoin');\"\u003e\u003cimg src=\"images/wallet_logo.png\"\u003e\u003c/div\u003e--\u003e"," \u003c/div\u003e"," \u003cdiv id=\"allsettings\"\u003e"," \u003cdiv align=\"center\"\u003eSettings\u003c/div\u003e "," \u003cdiv align=\"center\"\u003eIP Address\u003c/div\u003e"," \u003cdiv align=\"center\" id=\"ipaddress\"\u003e\u003c/div\u003e"," \u003cbr /\u003e"," \u003cdiv class=\"button\" "mainScreen()\"\u003e\u003cimg src=\"images/cancel.png\"\u003e\u003c/div\u003e"," \u003c/div\u003e"," \u003cdiv id=\"loading\" class=\"center-div\"\u003e"," \u003cimg src=\"images/loading.gif\"\u003e"," \u003c/div\u003e"," \u003cdiv id=\"coinInfo\"\u003e"," \u003cbr\u003e\u003cbr\u003e"," \u003cdiv align=\"center\"\u003eYou Have Selected \u003cstrong\u003e\u003cspan id=\"coinSelected\"\u003e\u003c/span\u003e\u003c/strong\u003e Current Price is: \u003cspan id=\"currentPrice\"\u003e\u003c/span\u003e\u003c/div\u003e"," \u003cdiv align=\"center\"\u003eAt the current trading price you could buy \u003cspan id=\"amount_per\"\u003e\u003c/amount\u003e bitcoin\u003c/div\u003e"," \u003cbr\u003e\u003cbr\u003e"," \u003cdiv id=\"buynow\"\u003e"," \u003cdiv class=\"button\" "buyNow()\"\u003e\u003cimg src=\"images/continue.png\"\u003e\u003c/div\u003e"," \u003cdiv class=\"button\" "mainScreen()\"\u003e\u003cimg src=\"images/cancel.png\"\u003e\u003c/div\u003e"," \u003c/div\u003e"," \u003cdiv id=\"cancelonly\" class=\"button\" "mainScreen()\"\u003e\u003cimg src=\"images/cancel.png\"\u003e\u003c/div\u003e"," \u003c/div\u003e"," \u003cdiv id=\"getQR\"\u003e"," \u003cdiv align=\"center\"\u003e\u003cstrong\u003ePlease Scan Your QR Code\u003c/strong\u003e\u003c/div\u003e"," \u003ccenter\u003e\u003cdiv id=\"reader\" style=\"width:300px;height:250px; border:2px solid #FFF; margin:8px auto 10px auto;\" "stop()\"\u003e\u003c/div\u003e\u003c/center\u003e"," \u003cdiv class=\"button\" "mainScreen()\"\u003e\u003cimg src=\"images/cancel.png\"\u003e\u003c/div\u003e"," \u003c/div\u003e"," \u003cdiv id=\"gotQR\"\u003e"," \u003cdiv align=\"center\"\u003eYour QR Code is: \u003cstrong\u003e\u003cspan id=\"tqrcode\"\u003e\u003c/span\u003e\u003cstrong\u003e\u003c/div\u003e"," \u003cdiv id=\"reallybuynow\"\u003e"," \u003cbr\u003e\u003cbr\u003e"," \u003cdiv class=\"button\" "completePurchase()\"\u003e\u003cimg src=\"images/purchase.png\"\u003e\u003c/div\u003e"," \u003cdiv class=\"button\" "mainScreen()\"\u003e\u003cimg src=\"images/cancel.png\"\u003e\u003c/div\u003e"," \u003c/div\u003e",""," \u003c/body\u003e","\u003c/html\u003e"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/fzeeshan/catmjs/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"index.html","displayUrl":"https://github.com/fzeeshan/catmjs/blob/master/index.html?raw=true","headerInfo":{"blobSize":"14.1 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"0acbf32","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Ffzeeshan%2Fcatmjs%2Fblob%2Fmaster%2Findex.html","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"430","truncatedSloc":"413"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"HTML","languageID":146,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/fzeeshan/catmjs/blob/master/index.html","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/fzeeshan/catmjs/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/fzeeshan/catmjs/raw/refs/heads/master/index.html","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":true,"symbols":[]}},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/fzeeshan/catmjs/branches":{"post":"FikjRRY9yMewbW0At1nI6CSyHm7-17hABhQHN6JhjRpDEYijBQIP6tZsMdPcvGz2cEC0CpwEeLtADz8b2ofTKQ"},"/repos/preferences":{"post":"ct7KxToEvBfWNdoKW2VVkHAd8LcHNYxc73ZxxmM_Rg1HcWSZgDp5XC7FW9fApf3YhEi0FBVwfdToWwtA0AXcmQ"}}},"title":"catmjs/index.html at master · fzeeshan/catmjs","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0