@jeniex/utils 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/index.cjs +2 -2
- package/browser/index.js +2 -2
- package/package.json +1 -1
package/browser/index.cjs
CHANGED
|
@@ -244,9 +244,9 @@ function capitalize(sentence) {
|
|
|
244
244
|
return capitalizeWord(sentence);
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
const scriptName = GM.info.script.name;
|
|
247
|
+
const scriptName = typeof GM === 'undefined' ? '' : GM.info.script.name;
|
|
248
248
|
/** The initial tab URL on the script run. */
|
|
249
|
-
const tabURL = window.location.href;
|
|
249
|
+
const tabURL = typeof window === 'undefined' ? '' : window.location.href;
|
|
250
250
|
|
|
251
251
|
function alert(message) {
|
|
252
252
|
if (message === undefined) {
|
package/browser/index.js
CHANGED
|
@@ -242,9 +242,9 @@ function capitalize(sentence) {
|
|
|
242
242
|
return capitalizeWord(sentence);
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
const scriptName = GM.info.script.name;
|
|
245
|
+
const scriptName = typeof GM === 'undefined' ? '' : GM.info.script.name;
|
|
246
246
|
/** The initial tab URL on the script run. */
|
|
247
|
-
const tabURL = window.location.href;
|
|
247
|
+
const tabURL = typeof window === 'undefined' ? '' : window.location.href;
|
|
248
248
|
|
|
249
249
|
function alert(message) {
|
|
250
250
|
if (message === undefined) {
|