Skip to content

Commit

Permalink
Don't apply margins option to report window
Browse files Browse the repository at this point in the history
CSS is too hard
  • Loading branch information
3nly committed Dec 2, 2024
1 parent d694134 commit e91ec95
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -990,10 +990,15 @@
$SS.exportOptions[key] = $SS.conf[key];
};
};
$SS.conf["Margin Left"] = $SS.conf["Left Margin"] !== 999 ? $SS.conf["Left Margin"] : $SS.conf["Custom Left Margin"];
$SS.conf["Margin Right"] = $SS.conf["Right Margin"] !== 999 ? $SS.conf["Right Margin"] : $SS.conf["Custom Right Margin"];
$SS.conf["Margin Post Message"] = $SS.conf["Post Message Margin"] === 1 ? "4px 16px" : ($SS.conf["Post Message Margin"] === 3 ? "20px 40px" : "");
$SS.conf["Width Decoration"] = $SS.conf["Decoration Width"] !== 999 ? $SS.conf["Decoration Width"] : $SS.conf["Custom Decoration Width"];

$SS.location = $SS.getLocation();

if (!$SS.location.report) {
$SS.conf["Margin Left"] = $SS.conf["Left Margin"] !== 999 ? $SS.conf["Left Margin"] : $SS.conf["Custom Left Margin"];
$SS.conf["Margin Right"] = $SS.conf["Right Margin"] !== 999 ? $SS.conf["Right Margin"] : $SS.conf["Custom Right Margin"];
$SS.conf["Margin Post Message"] = $SS.conf["Post Message Margin"] === 1 ? "4px 16px" : ($SS.conf["Post Message Margin"] === 3 ? "20px 40px" : "");
$SS.conf["Width Decoration"] = $SS.conf["Decoration Width"] !== 999 ? $SS.conf["Decoration Width"] : $SS.conf["Custom Decoration Width"];
};
},
get: function(name) {
var val = this.hasGM ?
Expand Down Expand Up @@ -3398,6 +3403,7 @@
sub: obj.hostname.split(".")[0],
board: pathname[0],
home: location.hostname === "www.4chan.org",
report: location.hostname === "sys.4chan.org",
nsfw: /^(aco|b|bant|d|e|f|gif|h|hr|r|s|t|u|wg|i|ic|r9k|hm|y|hc|pol|soc|s4s|trash)$/.test(pathname[0]),
reply: pathname[1] === "thread",
catalog: pathname[1] === "catalog",
Expand Down

0 comments on commit e91ec95

Please sign in to comment.