forked from e621ng/e621ng
[JS] Fix an error in older browsers caused by replaceAll (#747)
Fixes #744
This commit is contained in:
parent
a20aaae0e0
commit
28ebc378e0
@ -279,7 +279,7 @@ Autocomplete.render_item = function(list, item) {
|
||||
if (item.type === "tag") {
|
||||
$link.addClass("tag-type-" + item.category);
|
||||
} else if (item.type === "user") {
|
||||
var level_class = "user-" + item.level.replaceAll(" ", "-").toLowerCase();
|
||||
var level_class = "user-" + item.level.replace(/ /g, "-").toLowerCase();
|
||||
$link.addClass(level_class);
|
||||
if (Utility.meta("style-usernames") === "true") {
|
||||
$link.addClass("with-style");
|
||||
|
@ -2,7 +2,7 @@ let ForumTopic = {};
|
||||
|
||||
ForumTopic.init_mark_all_as_read = function () {
|
||||
$("#subnav-mark-all-as-read-link").on("click.danbooru", () => {
|
||||
return confirm(`Are you sure that you want to mark all ${$("body").data("controller").replaceAll("-", " ")} as read?`);
|
||||
return confirm(`Are you sure that you want to mark all ${$("body").data("controller").replace(/-/g, " ")} as read?`);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -140,7 +140,7 @@ class FilterToken {
|
||||
this.type = FilterUtils.getFilterType(raw);
|
||||
if (this.type !== "tag") raw = raw.slice(this.type.length + 1);
|
||||
else if (raw.includes("*")) {
|
||||
this.value = new RegExp(raw.replaceAll(/\*/g, ".*"));
|
||||
this.value = new RegExp(raw.replace(/\*/g, ".*"));
|
||||
this.type = "wildcard";
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user