I would like to be able to debug myself but how?
Why can't I single step through these uncaught syntax errors at my end?
This JS source provided to me by Appery.io
The last line is 21 and I question where is h1 initialized?
b64.charAt(h1)
I suspect o1 has no data in because data is null.
alert('Calling TwitSearchGlobal.beforeSearchTwit')
TwitSearchGlobal = {
bearerToken : "",
Code: Select all
encodeBase64 : function ( data ) {
// Encodes data with MIME base64
// + original by: Tyler Akins (http://rumkin.com)
// + improved by: Bayron Guevara
Code: Select all
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var o1, o2, o3, h1, h2, h3, h4, bits, i=0, enc='';
do {
// pack three octets into four hexes
Code: Select all
o1 = data.charCodeAt(i++);
o2 = data.charCodeAt(i++);
o3 = data.charCodeAt(i++);
LINE 21 bits = o1<18 & 0x3f;