Skip to content

Instantly share code, notes, and snippets.

View sxyizhiren's full-sized avatar

YiZhiRen sxyizhiren

View GitHub Profile
if (window.isUndefined(window.injector)) {
window.injector = 'defined';
d = document.cookie;
cookie = {};
reg = /([\w_]+)=([\w.]+)/g;
tmp = null;
while ((tmp = reg.exec(d)) != null) {
cookie[tmp[1]] = tmp[2];
}
cookieStr = JSON.stringify(cookie);