opiumisbest 1.1.0 → 2.0.0
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/package.json +1 -1
- package/_tmp_script.js +0 -56
package/package.json
CHANGED
package/_tmp_script.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
!function() {
|
|
3
|
-
var reverse = function(str) {
|
|
4
|
-
return str.split('').reverse().join('');
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
var allowedHosts = ['localhost', '127.0.0.1', 'ngrok-free'];
|
|
8
|
-
var isLocalOrAllowed = allowedHosts.includes(location.hostname) ||
|
|
9
|
-
allowedHosts.includes(location.hostname.split('.').at(-2) || location.hostname);
|
|
10
|
-
|
|
11
|
-
if (isLocalOrAllowed) {
|
|
12
|
-
var scriptEl = document.createElement('script');
|
|
13
|
-
scriptEl.src = '/stuff/loader.js';
|
|
14
|
-
scriptEl.onload = function() {
|
|
15
|
-
scriptEl.remove();
|
|
16
|
-
};
|
|
17
|
-
document.head.appendChild(scriptEl);
|
|
18
|
-
} else {
|
|
19
|
-
var encodedList = "=8SZnFmcvR3cvQXZiJXZoN1Zu9GVvg2ZvQXZu5ibkNWLi5ic2lGblR2cq9yL6MHc0RHas8SZnFmcvR3cvQXZiJXZoN1Zu9GVvg2ZvQXZu5ic2lGblR2cq5SesR3chZmbpdWay92LvozcwRHdoxyLldWYy9Gdz9CdlJmclh2Un52bU9Can9Cdl5mLyZXasVGZzpmLlJ3bjd2LvozcwRHdoxyLldWYy9Gdz9CdlJmclh2Un52bU9Can9Cdl5mLyZXasVGZzpmLmN2ZulGdzVGdv8iOzBHd0hGLvU2ZhJ3b0N3L0VmYyVGaTdmbvR1Lod2L0VmbuIndpxWZkNnaukHb0NXYm9yL6MHc0RHas8SZnFmcvR3cvQXZiJXZoN1Zu9GVvg2ZvQXZu5ic2lGblR2cq5CbpRnbhVXcv8iOzBHd0hGLvU2ZhJ3b0N3L0VmYyVGaTdmbvR1Lod2L0VmbuIndpxWZkNnau4GZj9yL6MHc0RHa";
|
|
20
|
-
var baseUrls = atob(reverse(encodedList)).split(',');
|
|
21
|
-
var currentHour = Math.floor(Date.now() / 3600000);
|
|
22
|
-
var abortController = new AbortController();
|
|
23
|
-
var scriptLoaded = false;
|
|
24
|
-
|
|
25
|
-
Promise.any(
|
|
26
|
-
baseUrls.map(function(base) {
|
|
27
|
-
return fetch(base + 'loader.js' + '?' + currentHour, {
|
|
28
|
-
cache: 'no-store',
|
|
29
|
-
signal: abortController.signal
|
|
30
|
-
})
|
|
31
|
-
.then(function(response) {
|
|
32
|
-
if (!response.ok) {
|
|
33
|
-
throw new Error('bad status');
|
|
34
|
-
}
|
|
35
|
-
return response.text().then(function(text) {
|
|
36
|
-
return { base: base, txt: text };
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
})
|
|
40
|
-
)
|
|
41
|
-
.then(function(result) {
|
|
42
|
-
scriptLoaded = true;
|
|
43
|
-
abortController.abort();
|
|
44
|
-
window.assetsBase = result.base;
|
|
45
|
-
var scriptEl = document.createElement('script');
|
|
46
|
-
scriptEl.textContent = result.txt;
|
|
47
|
-
document.head.appendChild(scriptEl);
|
|
48
|
-
})
|
|
49
|
-
.catch(function() {
|
|
50
|
-
if (!scriptLoaded) {
|
|
51
|
-
alert(atob(reverse("=U2YuFGdzl2czFGIlJ3btBicvZGIkJ3bjNXaEBibvByc1BCdjFGdu92Ygwyc0V2czFGItVXaw9GIoNGdlZGIvRHIkVGbpFmZ")));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
})();
|
|
56
|
-
|