mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2026-02-02 04:54:31 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
23a59c733e
|
|||
|
a0b99029bf
|
|||
|
e7c7783e71
|
@@ -3,7 +3,12 @@
|
|||||||
*
|
*
|
||||||
* https://github.com/BetterDiscord/BetterDiscord/blob/2752daf64f98625fc67c569361bd56021307d058/renderer/src/modules/webpackmodules.js
|
* https://github.com/BetterDiscord/BetterDiscord/blob/2752daf64f98625fc67c569361bd56021307d058/renderer/src/modules/webpackmodules.js
|
||||||
* https://github.com/BetterDiscord/BetterDiscord/blob/2752daf64f98625fc67c569361bd56021307d058/LICENSE
|
* https://github.com/BetterDiscord/BetterDiscord/blob/2752daf64f98625fc67c569361bd56021307d058/LICENSE
|
||||||
|
*
|
||||||
|
* https://github.com/BetterDiscord/BetterDiscord/blob/1b859560148a908f077278fba9625ea82e670222/src/betterdiscord/webpack/shared.ts
|
||||||
|
* https://github.com/BetterDiscord/BetterDiscord/blob/1b859560148a908f077278fba9625ea82e670222/LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// noinspection RedundantIfStatementJS
|
||||||
class WEBPACK {
|
class WEBPACK {
|
||||||
static get require() {
|
static get require() {
|
||||||
if (this._require) {
|
if (this._require) {
|
||||||
@@ -33,6 +38,31 @@ class WEBPACK {
|
|||||||
return this.require.c;
|
return this.require.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static shouldSkipModule(exports) {
|
||||||
|
if (!(typeof exports === "object" || typeof exports === "function")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!exports) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (exports === window) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (exports === document.documentElement) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (exports[Symbol.toStringTag] === "DOMTokenList") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (exports === Symbol) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (exports instanceof Window) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static filterByProps(...props) {
|
static filterByProps(...props) {
|
||||||
return module => props.every(prop => prop in module);
|
return module => props.every(prop => prop in module);
|
||||||
}
|
}
|
||||||
@@ -42,41 +72,40 @@ class WEBPACK {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static findModules(filter) {
|
static findModules(filter) {
|
||||||
const defaultExport = true;
|
|
||||||
const moduleFilter = module => (typeof module === "object" || typeof module === "function") && filter(module);
|
const moduleFilter = module => (typeof module === "object" || typeof module === "function") && filter(module);
|
||||||
|
|
||||||
const results = [];
|
const results = [];
|
||||||
|
|
||||||
for (const module of Object.values(this.getAllModules())) {
|
for (const module of Object.values(this.getAllModules())) {
|
||||||
/**
|
/**
|
||||||
* @type {Object}
|
* @type {Object} Exports
|
||||||
* @property [Z]
|
* @property [A]
|
||||||
* @property [ZP]
|
* @property [Ay]
|
||||||
* @property [__esModule]
|
|
||||||
* @property [default]
|
* @property [default]
|
||||||
*/
|
*/
|
||||||
const exports = module.exports;
|
const exports = module.exports;
|
||||||
if (!exports || exports === window || exports === document.documentElement || exports[Symbol.toStringTag] === "DOMTokenList") {
|
if (this.shouldSkipModule(exports)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let foundModule = null;
|
let foundModule;
|
||||||
if (exports.Z && moduleFilter(exports.Z)) {
|
if (exports.A && moduleFilter(exports.A)) {
|
||||||
foundModule = defaultExport ? exports.Z : exports;
|
foundModule = exports.A;
|
||||||
}
|
}
|
||||||
if (exports.ZP && moduleFilter(exports.ZP)) {
|
else if (exports.Ay && moduleFilter(exports.Ay)) {
|
||||||
foundModule = defaultExport ? exports.ZP : exports;
|
foundModule = exports.Ay;
|
||||||
}
|
}
|
||||||
if (exports.__esModule && exports.default && moduleFilter(exports.default)) {
|
else if (exports.default && moduleFilter(exports.default)) {
|
||||||
foundModule = defaultExport ? exports.default : exports;
|
foundModule = exports.default;
|
||||||
}
|
}
|
||||||
if (moduleFilter(exports)) {
|
else if (moduleFilter(exports)) {
|
||||||
foundModule = exports;
|
foundModule = exports;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
if (foundModule) {
|
continue;
|
||||||
results.push(foundModule);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
results.push(foundModule);
|
||||||
}
|
}
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
body {
|
body {
|
||||||
font-family: Whitney, "Helvetica Neue", Helvetica, Verdana, "Lucida Grande", sans-serif;
|
font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ using DHT.Utils;
|
|||||||
namespace DHT.Utils;
|
namespace DHT.Utils;
|
||||||
|
|
||||||
static class Version {
|
static class Version {
|
||||||
public const string Tag = "47.3.0.0";
|
public const string Tag = "47.4.0.0";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user