Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Commit 1b40b9d

Browse files
committed
changed the config to omit the keys, those are loaded in loader.user.js
1 parent ab362fd commit 1b40b9d

File tree

4 files changed

+24
-15
lines changed

4 files changed

+24
-15
lines changed

loader.user.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22
// @name ChatBot auto-loader
33
// @author Zirak
44
// @namespace ZirakInSpace
5-
// @version 0.1
5+
// @version 0.2
66
// @description Loads the bot when you visit a room
77
// @include /http://chat\.stack(overflow|exchange)\.com/rooms/\d+/
88
// ==/UserScript==
99

1010
var s = document.createElement( 'script' );
11+
s.onload = runConfigs;
1112
s.src = 'https://rawgit.com/Zirak/SO-ChatBot/master/master.js';
1213
document.head.appendChild( s );
14+
15+
function runConfigs() {
16+
var config = bot.config;
17+
config.weatherKey = '';
18+
config.githubToken = '';
19+
bot.memory.set('config', config);
20+
bot.memory.save();
21+
}

master.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -2109,13 +2109,13 @@ module.exports = function (bot) {
21092109
pattern: '!!',
21102110
welcomeMessage: welcomeFmt.supplant(rulesLink),
21112111

2112-
// visit OpenWeatherMap site to obtain a key.
2113-
// the sample key no longer works.
2114-
weatherKey: 'sample',
2112+
// these must be set for the weather
2113+
// command and backup command respectivly.
2114+
// I've removed the sample keys so I can easily
2115+
// change them with the bot loader script.
21152116

2116-
// visit github to obtain a key
2117-
// no public keys work.
2118-
githubToken: 'sample'
2117+
//weatherKey: '',
2118+
//githubToken: ''
21192119
},
21202120
bot.memory.get('config', {})
21212121
);

master.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/config.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ module.exports = function (bot) {
1212
pattern: '!!',
1313
welcomeMessage: welcomeFmt.supplant(rulesLink),
1414

15-
// visit OpenWeatherMap site to obtain a key.
16-
// the sample key no longer works.
17-
weatherKey: 'sample',
15+
// these must be set for the weather
16+
// command and backup command respectivly.
17+
// I've removed the sample keys so I can easily
18+
// change them with the bot loader script.
1819

19-
// visit github to obtain a key
20-
// no public keys work.
21-
githubToken: 'sample'
20+
//weatherKey: '',
21+
//githubToken: ''
2222
},
2323
bot.memory.get('config', {})
2424
);

0 commit comments

Comments
 (0)