Skip to content

Commit

Permalink
disabled debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyhalight committed Aug 6, 2024
1 parent bb73c50 commit 46bc205
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
21 changes: 1 addition & 20 deletions .webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,11 @@ function getHeaders(lang) {
}

export default (env) => {
//const build_mode = env.build_mode;
const build_type = env.build_type;
//console.log("build mode: ", build_mode);
console.log("build type: ", build_type);

function getFilename() {
let name = "vot";
// if (build_mode === "cloudflare") {
// name += "-cloudflare";
// }

if (build_type === "minify") {
name += "-min";
}
Expand All @@ -66,12 +60,6 @@ export default (env) => {
.flat();
}

// function getNameByBuildMode(name) {
// return build_mode === "cloudflare"
// ? name.replace("[VOT]", "[VOT Cloudflare]")
// : name;
// }

return monkey({
mode: dev ? "development" : "production",
resolve: {
Expand Down Expand Up @@ -100,11 +88,6 @@ export default (env) => {
meta.namespace = extFileName;
meta.updateURL = meta.downloadURL = finalURL;

// if (build_mode === "cloudflare") {
// meta.name = meta.name.replace("[VOT]", "[VOT Cloudflare]");
// meta["inject-into"] = "page";
// }

const files = fs.readdirSync(
path.resolve(__dirname, "src", "locales"),
);
Expand Down Expand Up @@ -141,9 +124,7 @@ export default (env) => {
maxChunks: 1,
}),
new webpack.DefinePlugin({
// BUILD_MODE: JSON.stringify(build_mode),
// DEBUG_MODE: dev,
DEBUG_MODE: true,
DEBUG_MODE: dev,
IS_BETA_VERSION: isBeta,
...(() => {
if (!dev) {
Expand Down
2 changes: 1 addition & 1 deletion dist/vot-min.user.js

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions dist/vot.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2429,7 +2429,9 @@ const en_namespaceObject = /*#__PURE__*/JSON.parse('{"__version__":4,"recommende
;// CONCATENATED MODULE: ./src/utils/debug.js
const debug = {};
debug.log = (...text) => {
if (false) {}
if (true) {
return;
}
return console.log(
"%c[VOT DEBUG]",
"background: #F2452D; color: #fff; padding: 5px;",
Expand Down Expand Up @@ -2598,7 +2600,7 @@ function isPiPAvailable() {
function initHls() {
return typeof Hls != "undefined" && Hls?.isSupported()
? new Hls({
debug: true, // turn it on manually if necessary
debug: false, // turn it on manually if necessary
lowLatencyMode: true,
backBufferLength: 90,
})
Expand Down Expand Up @@ -2701,7 +2703,7 @@ async function GM_fetch(url, opts = {}) {

const localesVersion = 4;
const localesUrl = `https://raw.githubusercontent.com/ilyhalight/voice-over-translation/${
true ? "dev" : 0
false ? 0 : "master"
}/src/localization/locales`;

const availableLocales = [
Expand Down

0 comments on commit 46bc205

Please sign in to comment.