mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2024-11-25 22:42:51 +01:00
Compare commits
2 Commits
3cca167793
...
a20ce8ee71
Author | SHA1 | Date | |
---|---|---|---|
a20ce8ee71 | |||
b5ae561da2 |
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Discord History Tracker
|
// @name Discord History Tracker
|
||||||
// @version v.31d
|
// @version v.31e
|
||||||
// @license MIT
|
// @license MIT
|
||||||
// @namespace https://chylex.com
|
// @namespace https://chylex.com
|
||||||
// @homepageURL https://dht.chylex.com/
|
// @homepageURL https://dht.chylex.com/
|
||||||
@ -228,8 +228,21 @@ var DISCORD = (function(){
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (obj.guild_id) {
|
else if (obj.guild_id) {
|
||||||
|
let guild;
|
||||||
|
|
||||||
|
for (const child of getReactProps(document.querySelector("nav header [class*='headerContent-']")).children) {
|
||||||
|
if (child && child.props && child.props.guild) {
|
||||||
|
guild = child.props.guild;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!guild || typeof guild.name !== "string" || obj.guild_id !== guild.id) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"server": document.querySelector("nav header h1[class*='name-']").innerText,
|
"server": guild.name,
|
||||||
"channel": obj.name,
|
"channel": obj.name,
|
||||||
"id": obj.id,
|
"id": obj.id,
|
||||||
"type": "SERVER",
|
"type": "SERVER",
|
||||||
@ -651,7 +664,7 @@ ${radio("asm", "pause", "Pause Tracking")}
|
|||||||
${radio("asm", "switch", "Switch to Next Channel")}
|
${radio("asm", "switch", "Switch to Next Channel")}
|
||||||
<p id='dht-cfg-note'>
|
<p id='dht-cfg-note'>
|
||||||
It is recommended to disable link and image previews to avoid putting unnecessary strain on your browser.<br><br>
|
It is recommended to disable link and image previews to avoid putting unnecessary strain on your browser.<br><br>
|
||||||
<sub>v.31d, released 19 June 2022</sub>
|
<sub>v.31e, released 10 October 2022</sub>
|
||||||
</p>`);
|
</p>`);
|
||||||
|
|
||||||
// elements
|
// elements
|
||||||
|
File diff suppressed because one or more lines are too long
4
build.py
4
build.py
@ -8,8 +8,8 @@ import os
|
|||||||
import re
|
import re
|
||||||
import distutils.dir_util
|
import distutils.dir_util
|
||||||
|
|
||||||
VERSION_SHORT = "v.31d"
|
VERSION_SHORT = "v.31e"
|
||||||
VERSION_FULL = VERSION_SHORT + ", released 19 June 2022"
|
VERSION_FULL = VERSION_SHORT + ", released 10 October 2022"
|
||||||
|
|
||||||
EXEC_UGLIFYJS_WIN = "{2}/lib/uglifyjs.cmd --parse bare_returns --compress --mangle toplevel --mangle-props keep_quoted,reserved=[{3}] --output \"{1}\" \"{0}\""
|
EXEC_UGLIFYJS_WIN = "{2}/lib/uglifyjs.cmd --parse bare_returns --compress --mangle toplevel --mangle-props keep_quoted,reserved=[{3}] --output \"{1}\" \"{0}\""
|
||||||
EXEC_UGLIFYJS_AUTO = "uglifyjs --parse bare_returns --compress --mangle toplevel --mangle-props keep_quoted,reserved=[{3}] --output \"{1}\" \"{0}\""
|
EXEC_UGLIFYJS_AUTO = "uglifyjs --parse bare_returns --compress --mangle toplevel --mangle-props keep_quoted,reserved=[{3}] --output \"{1}\" \"{0}\""
|
||||||
|
@ -71,3 +71,4 @@ msSaveBlob
|
|||||||
messageReference
|
messageReference
|
||||||
message_id
|
message_id
|
||||||
guild_id
|
guild_id
|
||||||
|
guild
|
||||||
|
@ -214,8 +214,21 @@ var DISCORD = (function(){
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (obj.guild_id) {
|
else if (obj.guild_id) {
|
||||||
|
let guild;
|
||||||
|
|
||||||
|
for (const child of getReactProps(document.querySelector("nav header [class*='headerContent-']")).children) {
|
||||||
|
if (child && child.props && child.props.guild) {
|
||||||
|
guild = child.props.guild;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!guild || typeof guild.name !== "string" || obj.guild_id !== guild.id) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"server": document.querySelector("nav header h1[class*='name-']").innerText,
|
"server": guild.name,
|
||||||
"channel": obj.name,
|
"channel": obj.name,
|
||||||
"id": obj.id,
|
"id": obj.id,
|
||||||
"type": "SERVER",
|
"type": "SERVER",
|
||||||
|
Loading…
Reference in New Issue
Block a user