A Penny and My Demo Episode One. Making an Introduction.
Archived series ("Inactive feed" status)
When? This feed was archived on July 02, 2018 02:37 (). Last successful fetch was on March 21, 2018 03:54 ()
Why? Inactive feed status. Our servers were unable to retrieve a valid podcast feed for a sustained period.
What now? You might be able to find a more up-to-date version using the search function. This series will no longer be checked for updates. If you believe this to be in error, please check if the publisher's feed link below is valid and contact support to request the feed be restored or if you have any other concerns about this.
Manage episode 200974246 series 2134588
In this episode I introduce the concept behind the show, tell you how you can support the show and play you a demo.
You can support the development of the show and my music by purchasing an EP from my Bandcamp page.
https://irshad.bandcamp.com/releases
Find me on Twitter and Instagram @irshad_ini
// <![CDATA[ var selected = null, // Object of the element to be moved x_pos = 0, y_pos = 0, // Stores x & y coordinates of the mouse pointer x_elem = 0, y_elem = 0; // Stores top, left values (edge) of the element (function() { //Eligib(); addJQuery(); document.onmousemove = _move_elem; document.onmouseup = _destroy; })(); function _drag_init(elem) { // Store the object of the element which needs to be moved selected = elem; x_elem = x_pos - selected.offsetLeft; y_elem = y_pos - selected.offsetTop; } function _move_elem(e) { x_pos = document.all ? window.event.clientX : e.pageX; y_pos = document.all ? window.event.clientY : e.pageY; if (selected !== null) { selected.style.left = (x_pos - x_elem) + 'px'; selected.style.top = (y_pos - y_elem) + 'px'; } } // Destroy the object when we are done function _destroy() { selected = null; } function togglecont(obj) { var nodelist = document.getElementsByClassName('balance-category'); var nodes = Array.prototype.slice.call(document.getElementsByClassName('bal-category')); var nindex = (nodes.indexOf(obj)); var classes = nodelist[nindex].getElementsByClassName("panel-body").item(0).getAttribute("class"); if (classes.indexOf("panel-hide") >= 0) { for (var x = 0; x < nodelist.length; x++) { if (x == nindex) { nodelist[x].getElementsByClassName("panel-body").item(0).classList.remove("panel-hide"); nodelist[x].getElementsByClassName("panel-body").item(0).classList.add("panel-show"); } else { nodelist[x].getElementsByClassName("panel-body").item(0).classList.add("panel-hide"); nodelist[x].getElementsByClassName("panel-body").item(0).classList.remove("panel-show"); } } } } function display(){ var classes = document.getElementById("vm-main-cursor").getAttribute("class"); //class not available if(classes.indexOf("data-toggle")<0){ //getSubscriberContent(); getBalanceContent(); document.getElementById("vm-main-cursor").classList.add("data-toggle"); document.getElementById("vm-main-cursor").setAttribute('src','http://buddytab.hutch.lk/pcc_balance_widget/img/cursor_1.png'); document.getElementById("vm-main-display").classList.add("vm-main-show"); document.getElementById("vm-main-display").classList.remove("vm-main-hide"); }else{ document.getElementById("vm-main-cursor").classList.remove("data-toggle"); document.getElementById("vm-main-cursor").setAttribute('src','http://buddytab.hutch.lk/pcc_balance_widget/img/cursor_2.png'); document.getElementById("vm-main-display").classList.remove("vm-main-show"); document.getElementById("vm-main-display").classList.add("vm-main-hide"); } } function display_exit(){ document.getElementById('vm_draggable').innerHTML = ''; } function togglepacks(){ var classes = document.getElementById("pack-list").getAttribute("class"); if(classes.indexOf("content-hide")<0){ document.getElementById("pack-list").classList.add("content-hide"); document.getElementById("more_button").classList.add("content-hide"); document.getElementById("pack-list").classList.remove("content-show"); document.getElementById("more_button").classList.remove("content-show"); } else{ document.getElementById("pack-list").classList.remove("content-hide"); document.getElementById("more_button").classList.remove("content-hide"); document.getElementById("pack-list").classList.add("content-show"); document.getElementById("more_button").classList.add("content-show"); } } function addJQuery(){ var xhr = new XMLHttpRequest({mozSystem: true}); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { //alert($(document).find("div.vm_inject_div").length); if(window.top.document.getElementsByClassName("vm_inject_div").length==0) { var s = window.top.document.createElement('div'); s.setAttribute('class', 'vm_inject_div'); s.setAttribute('style', 'background-color:transparent;cursor:move;position:relative;'); s.setAttribute('id', 'vm_draggable'); s.innerHTML = xhr.responseText; window.top.document.body.appendChild(s); document.getElementById("vm-main-cursor").setAttribute('src','http://buddytab.hutch.lk/pcc_balance_widget/img/cursor_2.png'); document.getElementById("vm-main-cursor").onclick = function() {display();}; //document.getElementById("show_packs_btn").onclick = function() {togglepacks();}; togglepacks(); // Bind the functions... //document.getElementById('vm_draggable').addEventListener('mousedown',function () { //_drag_init(this); //return false; //}); } getBalanceContent(); //getSubscriberContent(); } } xhr.open('POST', 'http://buddytab.hutch.lk/pcc_balance_widget/hutch_bal.php'); //xhr.open('POST', 'http://localhost:8081/inject2/hutch_bal.php'); xhr.send(); } function getSubscriberContent(){ var xhr = new XMLHttpRequest({mozSystem: true}); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { if(xhr.responseText!=null){ var cont = JSON.parse(xhr.responseText); if(cont.status) getBalanceContent(cont.content); else getBalanceContent(''); } } } xhr.open('GET', 'http://buddytab.hutch.lk/pcc_balance_widget.php'); //xhr.open('GET', 'http://localhost:8081/inject2/supply.php'); xhr.send(); } function getBalanceContent(shash){ var ord = Math.random()*10000000000000000; var xhr = new XMLHttpRequest({mozSystem: true}); if(shash!='') var params = JSON.stringify({hash:shash}); else var params = ''; xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { var div = document.getElementById('vm-main-display'); if(xhr.responseText!='') div.innerHTML = xhr.responseText; } } xhr.open('POST', 'http://buddytab.hutch.lk/pcc_balance_widget/get_balances.php?id='+ord,true); //xhr.open('POST', 'http://localhost:8081/inject2/get_balances.php',true); xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); xhr.send(params); } function packActivation(val){ var xhract = new XMLHttpRequest({mozSystem: true}); if(val != '' && val > 0){ console.log("dialog1"); xhract.open('POST', 'http://buddytab.hutch.lk/pcc_balance_widget/activate_pack.php',true); var act = JSON.stringify({hash:val}); xhract.onreadystatechange = function () { if (xhract.readyState === 4 && xhract.status === 200) { console.log("Activation response:"+xhract.responseText); hideDialog(); showDialogPackResponse(xhract.responseText); } } xhract.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); //hideDialog(); document.getElementById("btnhtok").style.visibility = "hidden"; document.getElementById("btnhtcancel").style.visibility = "hidden"; document.getElementById("dlghtmsg").innerHTML="Your Request is processing..."; xhract.send(act); console.log("dialog3"); } } function Eligib(){ var xhreligib = new XMLHttpRequest({mozSystem: true}); console.log("dialog1"); xhreligib.open('POST', 'http://buddytab.hutch.lk/pcc_balance_widget/eligible.php',true); xhreligib.onreadystatechange = function () { if (xhreligib.readyState === 4 && xhreligib.status === 200) { console.log("dialog2"); var res = xhreligib.responseText; console.log(res); if(res == 'yes'){ addJQuery(); } } } xhreligib.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); xhreligib.send(); console.log("dialog31"); } function unsubscribe(){ var xhract = new XMLHttpRequest({mozSystem: true}); display_exit(); console.log("dialog1"); xhract.open('POST', 'http://buddytab.hutch.lk/pcc_balance_widget/unsubscribe.php',true); //var act = JSON.stringify({hash:val}); xhract.onreadystatechange = function () { if (xhract.readyState === 4 && xhract.status === 200) { console.log("dialog2"); } } xhract.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); xhract.send(); console.log("dialog3"); } function hideDialog(){ document.getElementById("balance-list").classList.remove("dialog-overlay"); document.getElementById("footer-ad").classList.remove("dialog-overlay"); document.getElementById("footer-adviz").classList.remove("dialog-overlay"); document.getElementById("conf-dialog").classList.remove("dialog-show"); document.getElementById("conf-dialog").classList.add("dialog-hide"); document.getElementById("btnhtok").removeAttribute("onclick"); document.getElementById("btnhtok").style.visibility = "visible"; document.getElementById("btnhtcancel").style.visibility = "visible"; if(document.getElementById("more_button")) document.getElementById("more_button").classList.remove("dialog-overlay"); if(document.getElementById("show_packs_btn")) document.getElementById("show_packs_btn").classList.remove("dialog-overlay"); document.getElementById("pack-list").classList.remove("dialog-overlay"); } function showDialogUnsubscribe(){ console.log("Opening Unsubscribe Dialog"); document.getElementById("balance-list").classList.add("dialog-overlay"); document.getElementById("footer-ad").classList.add("dialog-overlay"); document.getElementById("footer-adviz").classList.add("dialog-overlay"); document.getElementById("conf-dialog").classList.add("dialog-show"); document.getElementById("conf-dialog").classList.remove("dialog-hide"); document.getElementById("dlghtmsg").innerHTML="Do you wish to permanently disable the Hutch Buddy Tab?"; document.getElementById("btnhtok").setAttribute("onclick","unsubscribe();"); var x=0; x = document.getElementById("vm-main-display").offsetTop; var ch=(document.getElementById("vm-main-display").offsetHeight-document.getElementById("conf-dialog").offsetHeight)/2; document.getElementById("conf-dialog").style.top=(x+ch)+"px"; document.getElementById("conf-dialog").style.right=0; document.getElementById("pack-list").classList.add("dialog-overlay"); if(document.getElementById("more_button")) document.getElementById("more_button").classList.add("dialog-overlay"); if(document.getElementById("show_packs_btn")) document.getElementById("show_packs_btn").classList.add("dialog-overlay"); } function showDialogActivate(val,name){ console.log("Opening Pack Act Dialog"); document.getElementById("balance-list").classList.add("dialog-overlay"); document.getElementById("footer-ad").classList.add("dialog-overlay"); document.getElementById("footer-adviz").classList.add("dialog-overlay"); document.getElementById("conf-dialog").classList.add("dialog-show"); document.getElementById("conf-dialog").classList.remove("dialog-hide"); document.getElementById("btnhtok").setAttribute("onclick","packActivation("+val+");"); document.getElementById("dlghtmsg").innerHTML="Please confirm to activate Rs."+name+" data pack?"; var x =0; x = document.getElementById("vm-main-display").offsetTop; var ch=(document.getElementById("vm-main-display").offsetHeight-document.getElementById("conf-dialog").offsetHeight)/2; document.getElementById("conf-dialog").style.top=(x+ch)+"px"; document.getElementById("conf-dialog").style.right=0; document.getElementById("pack-list").classList.add("dialog-overlay"); if(document.getElementById("more_button")) document.getElementById("more_button").classList.add("dialog-overlay"); if(document.getElementById("show_packs_btn")) document.getElementById("show_packs_btn").classList.add("dialog-overlay"); } function showDialogPackResponse(msg){ console.log("Opening Pack Response Dialog"); document.getElementById("balance-list").classList.add("dialog-overlay"); document.getElementById("footer-ad").classList.add("dialog-overlay"); document.getElementById("footer-adviz").classList.add("dialog-overlay"); document.getElementById("conf-dialog").classList.add("dialog-show"); document.getElementById("conf-dialog").classList.remove("dialog-hide"); document.getElementById("dlghtmsg").innerHTML =msg; document.getElementById("btnhtok").setAttribute("onclick","hideDialog();"); document.getElementById("btnhtcancel").style.visibility = "hidden"; var x =0; x = document.getElementById("vm-main-display").offsetTop; var ch=(document.getElementById("vm-main-display").offsetHeight-document.getElementById("conf-dialog").offsetHeight)/2; document.getElementById("conf-dialog").style.top=(x+ch)+"px"; document.getElementById("conf-dialog").style.right=0; document.getElementById("pack-list").classList.add("dialog-overlay"); if(document.getElementById("more_button")) document.getElementById("more_button").classList.add("dialog-overlay"); if(document.getElementById("show_packs_btn")) document.getElementById("show_packs_btn").classList.add("dialog-overlay"); } // ]]>
One episode