File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
2
* Utility methods
3
3
*
4
+ * @remarks
5
+ * If you want to log events, errors, etc. locally during development,
6
+ * save a true boolean key named isDevelopmentBuild to local storage
7
+ *
4
8
* @module chrome/utils
5
9
*/
6
10
14
18
*/
15
19
16
20
import * as ChromeLocale from './locales.js' ;
21
+ import * as ChromeStorage from './storage.js' ;
17
22
18
23
declare var ChromePromise : any ;
19
24
const chromep = new ChromePromise ( ) ;
20
25
21
- /**
22
- * Set to true if development build
23
- *
24
- * @remarks
25
- *
26
- * Do not change name as it is processed during build
27
- */
28
- const _DEBUG = false ;
29
-
30
26
/** True if development build */
31
- export const DEBUG = _DEBUG ;
27
+ export const DEBUG = ChromeStorage . getBool ( 'isDevelopmentBuild' , false ) ;
32
28
33
29
/** Get the extension's name
34
30
*
@@ -157,6 +153,7 @@ export function isWhiteSpace(str: string | null | undefined) {
157
153
* @returns A pseudo-random string
158
154
*/
159
155
export function getRandomString ( len = 8 ) {
156
+ // noinspection SpellCheckingInspection
160
157
const POSS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' ;
161
158
let text = '' ;
162
159
for ( let i = 0 ; i < len ; i ++ ) {
You can’t perform that action at this time.
0 commit comments