Skip to content

Instantly share code, notes, and snippets.

View KBelau's full-sized avatar

Kristoffer Belau KBelau

View GitHub Profile
@KBelau
KBelau / internalStartup.js
Last active June 11, 2019 14:57
Template - YouTube Brand Guardian
/* Auto-Generated File - Don't mess with it. */
var __LINE_FILE_LOOKUP = {};
function __CURRENT_LINE() { try { throw new Error(); } catch (e) { return parseInt(e.stack.split("\n")[1].match(/:[0-9]*/igm)[0].substring(1)); } }
function __LOAD(file, relative, line, name) { __LINE_FILE_LOOKUP[line] = (relative ? file : name); return UrlFetchApp.fetch((relative ? (__URL + file) : (file)) + "?d=" + new Date().getTime()).getBlob().getDataAsString(); }
function __WRAP_FN(fn) { return function() { try { return fn.apply(this, arguments); } catch (e) { if (e.hasOwnProperty("_f")) throw e; throw __FMT_ERROR(e); } }; } var __WRAP_FN_LINE = __CURRENT_LINE();
function __FMT_ERROR(e) { if (typeof(e) !== "object") return e; var stck = e.stack.split("\n"), result = []; for (var i = 0; i < stck.length; ++i) { var matches = stck[i].match(/#([0-9]*)\(eval\)/igm);
if (matches === null) { result.push(stck[i].replace("Code", "<code>")); } else if (matches.length == 1) { if (parseInt(stck[i].match(/:[0-9]*/i