Skip to content

Commit 2b56673

Browse files
committed
fix: extensions with irrelegular message files breaking workflow
1 parent 02330e0 commit 2b56673

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

info.plist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,6 @@ Created by [Chris Grieser](https://chris-grieser.de/).</string>
224224
<dict>
225225
<key>colorindex</key>
226226
<integer>3</integer>
227-
<key>note</key>
228-
<string>chromium extension search</string>
229227
<key>xpos</key>
230228
<real>30</real>
231229
<key>ypos</key>

scripts/chromium-extensions-and-pages.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,24 @@ function run() {
8181
// determine name (SIC can be in one of these many locations)
8282
let name = manifest.name;
8383
if (name.startsWith("__MSG_") && manifest.short_name) name = manifest.short_name;
84-
if (name.startsWith("__MSG_")) {
85-
const msg = JSON.parse(readFile(root + "_locales/en/messages.json"));
84+
const msgsFile = root + "_locales/en/messages.json";
85+
if (name.startsWith("__MSG_") && fileExists(msgsFile)) {
86+
const msg = JSON.parse(readFile(msgsFile));
8687
name =
8788
msg.extensionName?.message ||
8889
msg.name?.message ||
8990
msg.extName?.message ||
9091
msg.appName?.message ||
91-
"[name not found]";
92+
manifest.short_name ||
93+
manifest.name;
9294
}
9395

9496
// determine options path
9597
let optionsPath = manifest.options_ui?.page || manifest.options_page || "";
9698

9799
// INFO EXCEPTIONS
98100
if (name === "Stylus") optionsPath = "manage.html";
101+
if (name === "Redirector") optionsPath = "redirector.html";
99102
if (id === "bbojmeobdaicehcopocnfhaagefleiae") name = "OptiSearch";
100103
const anchor = specialAnchors[name] || "";
101104

0 commit comments

Comments
 (0)