From d147fe04710aada3221c96d35c4b118fe596eab1 Mon Sep 17 00:00:00 2001 From: bust3d Date: Mon, 25 Mar 2024 21:48:33 +0000 Subject: [PATCH] - remove old and unneeded JS stuff (thanks to lpm11) - removed one more touch element forgotten - whitespace cleanup git-svn-id: https://svn.streamboard.tv/oscam/trunk@11755 4b0bc96b-bc66-0410-9d44-ebda105a78c1 --- oscam.c | 1 - webif/graph/graph.svg | 18 +--- webif/include/jscript.js | 231 ++++++++++++----------------------------------- 3 files changed, 65 insertions(+), 185 deletions(-) diff --git a/oscam.c b/oscam.c index 77663d47..7a922089 100644 --- a/oscam.c +++ b/oscam.c @@ -388,7 +388,6 @@ static void write_versionfile(bool use_stdout) write_conf(WEBIF, "Web interface support"); write_conf(WEBIF_LIVELOG, "LiveLog support"); write_conf(WEBIF_JQUERY, "jQuery support intern"); - write_conf(TOUCH, "Touch interface support"); write_conf(WITH_SSL, "SSL support"); write_conf(HAVE_DVBAPI, "DVB API support"); if(config_enabled(HAVE_DVBAPI)) diff --git a/webif/graph/graph.svg b/webif/graph/graph.svg index 2c0f370c..111ad7b1 100644 --- a/webif/graph/graph.svg +++ b/webif/graph/graph.svg @@ -14,10 +14,10 @@ - Change - - + Change + - - + - - - @@ -38,21 +38,13 @@ if (typeof getURL == 'undefined') { var http_request = null; if (typeof XMLHttpRequest != 'undefined') { http_request = new XMLHttpRequest(); - } else if (typeof ActiveXObject != 'undefined') { - try { - http_request = new ActiveXObject('Msxml2.XMLHTTP'); - } catch (e) { - try { - http_request = new ActiveXObject('Microsoft.XMLHTTP'); - } catch (e) {} - } } if (!http_request) { throw 'Both getURL and XMLHttpRequest are undefined'; } http_request.onreadystatechange = function() { if (http_request.readyState == 4) { - callback( + callback( { success : true, content : http_request.responseXML, @@ -245,7 +237,7 @@ function makeRoundMax(max) { } } return rmax; -} +} function handle_error() { SVGDoc.getElementById('graph_error').setAttributeNS(null, 'visibility', 'visible'); } diff --git a/webif/include/jscript.js b/webif/include/jscript.js index af9a3d37..b37fe8da 100644 --- a/webif/include/jscript.js +++ b/webif/include/jscript.js @@ -1,4 +1,3 @@ - var oReloadTimer = null; var oCounterTimer = null; @@ -29,10 +28,6 @@ function initDoc() { oCounterTimer = window.setInterval("runReloadCounter();", 1000); }; -function gotosite(Action) { - window.location.href = Action; -} - /* Function for add new reader/user in readers.html/userconfig.html */ function addinsert() { cdpause(); @@ -57,16 +52,16 @@ function cleaninsert(deleteinsert) { for (i = 0; i < tmp_array.length; i++) { if (tmp_array[i] != deleteinsert){ existing_inserts[i2] = tmp_array[i]; - i2++; + i2++; } } } var beep = (function () { - var contextClass = (window.AudioContext || - window.webkitAudioContext || - window.mozAudioContext || - window.oAudioContext || + var contextClass = (window.AudioContext || + window.webkitAudioContext || + window.mozAudioContext || + window.oAudioContext || window.msAudioContext); if (contextClass) { var ctx = new contextClass(); @@ -135,12 +130,6 @@ String.prototype.toHHMMSS = function () { return time; } -function runden(value) { - var k = (Math.round(value * 100) / 100).toString(); - k += (k.indexOf('.') == -1) ? '.00' : '00'; - return k.substring(0, k.indexOf('.') + 3); -} - /* * General: Eventhandler */ @@ -206,7 +195,7 @@ $(function () { $('table.status').on('mouseout', 'tr > td.statuscol14', function () { $("#chart").hide(); }); - + $("#add1regex").click(function () { if (MAX_SEARCH_PATTERN > 98) return; MAX_SEARCH_PATTERN++; @@ -269,7 +258,7 @@ $(function () { $('#hidden' + i).prop('checked', false); $('#color' + i).val($('.colorPicker_def_color').css('color')); $('#color' + i).change(); - $('#fcolor' + i).val($('.colorPicker_def_fcolor').css('color')); + $('#fcolor' + i).val($('.colorPicker_def_fcolor').css('color')); $('#fcolor' + i).change(); $('#beep' + i).prop('checked', false); localStorage['regex' + i] = ''; @@ -291,7 +280,7 @@ $(function () { } return false; }); - + $(".debugls a, .debugl a").click(function () { parameters = parameters + "&debug=" + $(this).attr('sendval'); return false; @@ -965,10 +954,10 @@ function updateLogpage(data) { } $.each(data.oscam.lines, function (i, item) { - - if (isWhitelisted(Base64.decode(item.line))) { - var newcolor = getLogColor(Base64.decode(item.line)); - var newline = $('
  • ' + Base64.decode(item.line) + '
  • \n'); + var entry = atob(item.line); + if (isWhitelisted(entry)) { + var newcolor = getLogColor(entry); + var newline = $('
  • ' + entry + '
  • \n'); var hiddenline = 0; if (newcolor) { if (newcolor.hidden != '1') { @@ -1071,82 +1060,25 @@ function addremoveSubheadline(remove, data, container, subheadline, type) { } } +function fillStatus(list, type, data) { + list.forEach(function(key) { + $("#" + key).text(data.oscam[type][key]); + }); +} + + /* * Statuspage Functions: Update Totals cacheEx */ function updateCacheextotals(data) { - $("#total_cachexpush").text(data.oscam.totals.total_cachexpush); - $("#total_cachexgot").text(data.oscam.totals.total_cachexgot); - $("#total_cachexhit").text(data.oscam.totals.total_cachexhit); - $("#rel_cachexhit").text(data.oscam.totals.rel_cachexhit); - $("#total_cachesize").text(data.oscam.totals.total_cachesize); + fillStatus(["total_cachexpush", "total_cachexgot", "rel_cachexhit", "total_cachesize"], "totals", data); } /* * Statuspage Functions: Update Totals User + Totals Reader + ECM + EMM */ function updateTotals(data) { - $("#total_users").text(data.oscam.totals.total_users); - $("#total_active").text(data.oscam.totals.total_active); - $("#total_connected").text(data.oscam.totals.total_connected); - $("#total_online").text(data.oscam.totals.total_online); - $("#total_disabled").text(data.oscam.totals.total_disabled); - $("#total_expired").text(data.oscam.totals.total_expired); - $("#total_readers").text(data.oscam.totals.total_readers); - $("#total_active_readers").text(data.oscam.totals.total_active_readers); - $("#total_connected_readers").text(data.oscam.totals.total_connected_readers); - $("#total_disabled_readers").text(data.oscam.totals.total_disabled_readers); - $("#total_cwok").text(data.oscam.totals.total_cwok); - $("#total_cwok_readers").text(data.oscam.totals.total_cwok_readers); - $("#rel_cwok").text(data.oscam.totals.rel_cwok); - $("#rel_cwok_readers").text(data.oscam.totals.rel_cwok_readers); - $("#total_cwcache").text(data.oscam.totals.total_cwcache); - $("#rel_cwcache").text(data.oscam.totals.rel_cwcache); - $("#total_cwnok").text(data.oscam.totals.total_cwnok); - $("#total_cwnok_readers").text(data.oscam.totals.total_cwnok_readers); - $("#rel_cwnok").text(data.oscam.totals.rel_cwnok); - $("#rel_cwnok_readers").text(data.oscam.totals.rel_cwnok_readers); - $("#total_cwtout").text(data.oscam.totals.total_cwtout); - $("#total_cwtout_readers").text(data.oscam.totals.total_cwtout_readers); - $("#rel_cwtout").text(data.oscam.totals.rel_cwtout); - $("#rel_cwtout_readers").text(data.oscam.totals.rel_cwtout_readers); - $("#total_cwign").text(data.oscam.totals.total_cwign); - //$( "#rel_cwign" ).text( data.oscam.totals.rel_cwign ); - $("#total_ecm_min").text(data.oscam.totals.total_ecm_min); - $("#total_cw").text(data.oscam.totals.total_cw); - $("#total_cwpos").text(data.oscam.totals.total_cwpos); - $("#total_cwpos_readers").text(data.oscam.totals.total_cwpos_readers); - $("#rel_cwpos").text(data.oscam.totals.rel_cwpos); - $("#rel_cwpos_readers").text(data.oscam.totals.rel_cwpos_readers); - $("#total_cwneg").text(data.oscam.totals.total_cwneg); - $("#total_cwneg_readers").text(data.oscam.totals.total_cwneg_readers); - $("#rel_cwneg").text(data.oscam.totals.rel_cwneg); - $("#rel_cwneg_readers").text(data.oscam.totals.rel_cwneg_readers); - $("#total_emok").text(data.oscam.totals.total_emok); - $("#rel_emok").text(data.oscam.totals.rel_emok); - $("#total_emnok").text(data.oscam.totals.total_emnok); - $("#rel_emnok").text(data.oscam.totals.rel_emnok); - $("#total_em").text(data.oscam.totals.total_em); - $("#total_elenr").text(data.oscam.totals.total_elenr); - $("#total_eheadr").text(data.oscam.totals.total_eheadr); - $("#total_emmerroruk_readers").text(data.oscam.totals.total_emmerroruk_readers); - $("#total_emmerrorg_readers").text(data.oscam.totals.total_emmerrorg_readers); - $("#total_emmerrors_readers").text(data.oscam.totals.total_emmerrors_readers); - $("#total_emmerroruq_readers").text(data.oscam.totals.total_emmerroruq_readers); - $("#total_emmwrittenuk_readers").text(data.oscam.totals.total_emmwrittenuk_readers); - $("#total_emmwritteng_readers").text(data.oscam.totals.total_emmwritteng_readers); - $("#total_emmwrittens_readers").text(data.oscam.totals.total_emmwrittens_readers); - $("#total_emmwrittenuq_readers").text(data.oscam.totals.total_emmwrittenuq_readers); - $("#total_emmskippeduk_readers").text(data.oscam.totals.total_emmskippeduk_readers); - $("#total_emmskippedg_readers").text(data.oscam.totals.total_emmskippedg_readers); - $("#total_emmskippeds_readers").text(data.oscam.totals.total_emmskippeds_readers); - $("#total_emmskippeduq_readers").text(data.oscam.totals.total_emmskippeduq_readers); - $("#total_emmblockeduk_readers").text(data.oscam.totals.total_emmblockeduk_readers); - $("#total_emmblockedg_readers").text(data.oscam.totals.total_emmblockedg_readers); - $("#total_emmblockeds_readers").text(data.oscam.totals.total_emmblockeds_readers); - $("#total_emmblockeduq_readers").text(data.oscam.totals.total_emmblockeduq_readers); - $("#total_sum_all_readers_ecm").text(data.oscam.totals.total_sum_all_readers_ecm); - $("#total_sum_all_readers_emm").text(data.oscam.totals.total_sum_all_readers_emm); + fillStatus(["total_users", "total_active", "total_connected", "total_online", "total_disabled", "total_expired", "total_readers", "total_active_readers", "total_connected_readers", "total_disabled_readers", "total_cwok", "total_cwok_readers", "rel_cwok", "rel_cwok_readers", "total_cwcache", "rel_cwcache", "total_cwnok", "total_cwnok_readers", "rel_cwnok", "rel_cwnok_readers", "total_cwtout", "total_cwtout_readers", "rel_cwtout", "rel_cwtout_readers", "total_cwign", "total_ecm_min", "total_cw", "total_cwpos", "total_cwpos_readers", "rel_cwpos", "rel_cwpos_readers", "total_cwneg", "total_cwneg_readers", "rel_cwneg", "rel_cwneg_readers", "total_emok", "rel_emok", "total_emnok", "rel_emnok", "total_em", "total_elenr", "total_eheadr", "total_emmerroruk_readers", "total_emmerrorg_readers", "total_emmerrors_readers", "total_emmerroruq_readers", "total_emmwrittenuk_readers", "total_emmwritteng_readers", "total_emmwrittens_readers", "total_emmwrittenuq_readers", "total_emmskippeduk_readers", "total_emmskippedg_readers", "total_emmskippeds_readers", "total_emmskippeduq_readers", "total_emmblockeduk_readers", "total_emmblockedg_readers", "total_emmblockeds_readers", "total_emmblockeduq_readers", "total_sum_all_readers_ecm", "total_sum_all_readers_emm"], "totals", data); } /* @@ -1155,27 +1087,10 @@ function updateTotals(data) { var first_run = 1; function updateSysinfo(data) { - $("#mem_cur_total").text(data.oscam.sysinfo.mem_cur_total); - $("#mem_cur_free").text(data.oscam.sysinfo.mem_cur_free); - $("#mem_cur_used").text(data.oscam.sysinfo.mem_cur_used); - $("#mem_cur_buff").text(data.oscam.sysinfo.mem_cur_buff); - $("#mem_cur_cached").text(data.oscam.sysinfo.mem_cur_cached); + fillStatus(["mem_cur_total", "mem_cur_free", "mem_cur_used", "mem_cur_buff", "mem_cur_cached", "mem_cur_totalsw", "mem_cur_freesw", "mem_cur_usedsw", "mem_cur_shared", "oscam_vmsize", "oscam_rsssize", "server_procs", "cpu_load_0", "cpu_load_1", "cpu_load_2"], "sysinfo", data); $("#mem_cur_freem").attr('title', 'max Free: ' + data.oscam.sysinfo.mem_cur_freem + ' \n(incl. Buffer & Cached)'); - $("#mem_cur_totalsw").text(data.oscam.sysinfo.mem_cur_totalsw); - $("#mem_cur_freesw").text(data.oscam.sysinfo.mem_cur_freesw); - $("#mem_cur_usedsw").text(data.oscam.sysinfo.mem_cur_usedsw); - $("#mem_cur_shared").text(data.oscam.sysinfo.mem_cur_shared); - $("#oscam_vmsize").text(data.oscam.sysinfo.oscam_vmsize); - $("#oscam_rsssize").text(data.oscam.sysinfo.oscam_rsssize); - $("#server_procs").text(data.oscam.sysinfo.server_procs); - $("#cpu_load_0").text(data.oscam.sysinfo.cpu_load_0); - $("#cpu_load_1").text(data.oscam.sysinfo.cpu_load_1); - $("#cpu_load_2").text(data.oscam.sysinfo.cpu_load_2); if (!first_run) { - $("#oscam_refresh").text(data.oscam.sysinfo.oscam_refresh); - $("#oscam_cpu_user").text(data.oscam.sysinfo.oscam_cpu_user); - $("#oscam_cpu_sys").text(data.oscam.sysinfo.oscam_cpu_sys); - $("#oscam_cpu_sum").text(data.oscam.sysinfo.oscam_cpu_sum); + fillStatus(["oscam_refresh", "oscam_cpu_user", "oscam_cpu_sys", "oscam_cpu_sum"], "sysinfo", data); } first_run = 0; } @@ -1263,7 +1178,7 @@ function updateStatuspage(data) { if (!is_nopoll('statuscol1')) { $(uid + " > td.statuscol1").append('' + kill2 + 
+					kill1 + '' + kill2 +
 					''); } @@ -1283,7 +1198,7 @@ function updateStatuspage(data) { if (!is_nopoll('statuscol9')) { if (data.oscam.piconenabled == "1" && item.protoicon) { - $(uid + " > td.statuscol9").append(' td.statuscol9").append('IC_' + item.protoicon + ''); } else { $(uid + " > td.statuscol9").attr('title', item.protocolext).text(item.protocol); @@ -1297,7 +1212,7 @@ function updateStatuspage(data) { if ($(uid + " > td.statuscol4").text().match('anonymous')) { if (!is_nopoll('statuscol9')) { if (data.oscam.piconenabled == "1" && item.protoicon) { - $(uid + " > td.statuscol9").html(' td.statuscol9").html('IC_' + item.protoicon + ''); } else { $(uid + " > td.statuscol9").attr('title', item.protocolext).text(item.protocol); @@ -1584,15 +1499,6 @@ function updateStatuspage(data) { /* - * Cacheexpage Functions: Update Page - */ -function updateCacheexpage(data) { - - updateCacheextotals(data); - -} - -/* * General fork into page refresh functions */ function updatePage(data) { @@ -1617,7 +1523,7 @@ function updatePage(data) { updateLogpage(data); break; case 'cacheex': - updateCacheexpage(data); + updateCacheextotals(data); break; default: break; @@ -1693,7 +1599,7 @@ function setPollrefresh() { // Set pollintervall, if pollrefresh set to 0 disable polling if (pollrefresh) { pollintervall = parseInt(pollrefresh) * 1000; - if (pollintervall > 99000) pollintervall == 99000; + if (pollintervall > 99000) pollintervall = 99000; if (!nostorage) { if (sessionStorage.pollintervall) pollintervall = sessionStorage.pollintervall; else sessionStorage.pollintervall = pollintervall; @@ -1709,19 +1615,10 @@ var nostorage = 0; * General: Start Polling */ $(document).ready(function () { - - try { - if (!localStorage) { - nostorage = 1; - // remove whole filter block - makes no sense - // without saving - $('#regex').remove(); - } - } catch(err){ - nostorage = 1; - $('#regex').remove(); - } - + + nostorage = typeof localStorage == "undefined"; + $('#regex').remove(); + // set default to nothing excluded poll_excluded = ''; @@ -1754,7 +1651,7 @@ $(document).ready(function () { var saved_regex = localStorage.MAX_SEARCH_PATTERN; MAX_SEARCH_PATTERN = parseInt(saved_regex ? saved_regex : MAX_SEARCH_PATTERN); $('
  • ').insertBefore(".regexdata_save"); - + var beep_disabled = ' disabled="disabled" title="Not supported by your browser"'; var contextClass = (window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.oAudioContext || window.msAudioContext); if (contextClass) { beep_disabled = ''; } @@ -1806,7 +1703,6 @@ $(document).ready(function () { break; default: - //do nothing break; } @@ -1840,7 +1736,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { html += '


    '; } - var AddTextType = {"data":"Data", "length":"Length", "type":"Type", "emmType":"EMM-Type", "encryptionType":"Encryption Type", + var AddTextType = {"data":"Data", "length":"Length", "type":"Type", "emmType":"EMM-Type", "encryptionType":"Encryption Type", "keyIndex":"Key-Index", "keyIndex2":"Key-Index2", "fixedValue":"Fixed Value", "pairingDevice":"Pairing Device", "date":"Date", "checksum":"Checksum", "emmStartMarker":"EMM Marker", "cardSerial":"Serial Number (Smartcard)", "boxSerial":"Serial Number (Receiver)", "emmEndMarker":"Sub-EMM End", "rest":"rest ????", @@ -1872,7 +1768,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { text += " (cccam)"; } break; - + case AddTextType.mpegSectionLength: var len = ((parseInt(parm, 16) << 8) + parseInt(ret, 16)) & 0x0FFF; text += ' - ' + len + ''; @@ -1882,9 +1778,9 @@ function decodeVideoguardEMM(text, target, addHideButton) { } else { text += ' - FAIL (' + bytes.length + ')'; } - ret = len; + ret = len; break; - + case AddTextType.length: case AddTextType.cardEmmLength: case AddTextType.cardNanoLength: @@ -1903,25 +1799,25 @@ function decodeVideoguardEMM(text, target, addHideButton) { ret = len; break; case AddTextType.type: - + var type = parseInt(ret, 16) & 0xC0; var subEmmCount = ((parseInt(ret, 16) & 0x30) >> 16) + 1; - + if (type == 0x40) { text += ' - unique EMM For Smartcard'; - } + } else if (type == 0xC0) { text += ' - unique EMM For Receiver/CAM'; - } + } else if (type == 0x80) { text += ' - shared EMM For Smartcard'; - } + } else { text += ' - global EMM'; } - + text += ' (' + subEmmCount + ' Sub EMMs)'; - + break; case AddTextType.emmType: @@ -1955,7 +1851,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { } break; - + case AddTextType.cardNanoType: switch (ret) { case '01': @@ -1975,7 +1871,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { break; } break; - + case AddTextType.irdNanoType: switch (ret) { case '02': @@ -1993,7 +1889,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { break; } break; - + case AddTextType.filterNanoType: switch (ret) { case '30': @@ -2007,7 +1903,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { break; } break; - + case AddTextType.keyIndex: if (!isV13V14V15) { @@ -2075,17 +1971,17 @@ function decodeVideoguardEMM(text, target, addHideButton) { case AddTextType.irdEmmChecksum: var checksumData = parseInt(ret, 16); var checksum = 0x00; - + for(var i = 0; i < parm.length; i++) { checksum += parseInt(parm[i], 16); checksum &= 0xFF; } - + if (checksumData == checksum) { text += ' - OK'; } else { text += ' - FAIL (' + checksum.toString(16).toUpperCase() + ')'; - } + } break; } @@ -2096,7 +1992,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { function ReadSingleCardEMM() { var cardEmmLength = addText(1, '#00F', AddTextType.cardEmmLength); var remainingDataLength = cardEmmLength; - + while (remainingDataLength > 0 && bytes.length) { var cardNanoType = addText(1, '#008000', AddTextType.cardNanoType); @@ -2122,13 +2018,13 @@ function decodeVideoguardEMM(text, target, addHideButton) { "44": 0x04, "4E": 0x04, "7A": 0x02, - + "02": 0x01, "03": 0x03, "04": 0x00, "48": 0x00, "C0": 0x00, - + }; if (fixedSizeNanos[cardNanoType] != undefined) { @@ -2215,18 +2111,14 @@ function decodeVideoguardEMM(text, target, addHideButton) { } } - // ---------------------------------------------------------------------- - // ---------------------------------------------------------------------- - // ---------------------------------------------------------------------- - var partOfLength = bytes[1]; addText(2, '#000', AddTextType.emmStartMarker); addText(1, '#00F', AddTextType.mpegSectionLength, partOfLength); - + var filterByte = parseInt(addText(1, '#199a8d', AddTextType.type), 16); var type = filterByte & 0xC0; var subEmmCount = ((filterByte & 0x30) >> 16) + 1; - + if(partOfLength != 0) { // partOfLength == 0 for emms by cccam clients, these do not have the serials part for(var i = 0; i < subEmmCount; i++) { if (type == 0x40) { // unique: card @@ -2255,7 +2147,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { if (irdEmmLength > 0) { switch (emmtype) { case '02': - + var remainingDataLength = irdEmmLength - 1; while(remainingDataLength > 0 && bytes.length) { remainingDataLength -= ReadIrdNano(); @@ -2265,7 +2157,7 @@ function decodeVideoguardEMM(text, target, addHideButton) { case '07': var filterSectionLength = addText(1, '#00F', AddTextType.filterSectionLength); var remainingDataLength = filterSectionLength; - + while (remainingDataLength > 0 && bytes.length) { var filterNano = addText(1, '#008000', AddTextType.filterNanoType); switch (filterNano) { @@ -2284,13 +2176,13 @@ function decodeVideoguardEMM(text, target, addHideButton) { break; } } - + var remainingDataLength = irdEmmLength - 1 - filterSectionLength - 1; while(remainingDataLength > 0 && bytes.length) { remainingDataLength -= ReadIrdNano(); } break; - + default: addText(irdEmmLength - 1, '#000', AddTextType.data); break; @@ -2627,6 +2519,3 @@ function decodeVideoguardEMM(text, target, addHideButton) { } } })(jQuery) - -// Create Base64 Object -var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}} -- 2.11.4.GIT