Skip to content
This repository was archived by the owner on Feb 1, 2018. It is now read-only.

Commit 8a70a6d

Browse files
committed
Decrypt access token
1 parent d6642b7 commit 8a70a6d

5 files changed

Lines changed: 18 additions & 10 deletions

File tree

dist/js/main.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
repo: 'repo',*/
7272
path: '/',
7373
branch: 'gh-pages',
74-
editGithubBtn: true
74+
editGithubBtn: true,
75+
access_token: ''
7576
},
7677
generic: {
7778
baseurl: '',
@@ -88,7 +89,9 @@
8889
};
8990

9091
options = $.extend({}, defaults, options);
91-
92+
if(options.github.access_token) {
93+
options.github.access_token = atob(options.github.access_token);
94+
}
9295
if (options.method === 'github') {
9396
if (!options.github.user) {
9497
throw Error('Missing GitHub user info.');
@@ -1178,7 +1181,8 @@
11781181
skip = 1;
11791182
}
11801183
} else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
1181-
for (var i = 0; i < node.childNodes.length; ++i) {
1184+
var childLength = node.childNodes.length < 100 ? node.childNodes.length : 100;
1185+
for (var i = 0; i < childLength; ++i) {
11821186
i += innerHighlight(node.childNodes[i], pat);
11831187
}
11841188
}

0 commit comments

Comments
 (0)