Skip to content

Commit b43b263

Browse files
committed
update icon
1 parent 5d9f9db commit b43b263

20 files changed

+404
-3743
lines changed

assets/action.png

-8.19 KB
Loading

ios/app2095.xcodeproj/project.pbxproj

+384-3,705
Large diffs are not rendered by default.

target-plugin/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export const withTargetsDir: ConfigPlugin<{
1111
}> = (config, { appleTeamId, match = "*" }) => {
1212
const projectRoot = config._internal.projectRoot;
1313

14-
const targets = globSync(`./targets/${match}/expo-target.config.@(json|js)`, {
15-
// const targets = globSync(`./targets/action/expo-target.config.@(json|js)`, {
14+
// const targets = globSync(`./targets/${match}/expo-target.config.@(json|js)`, {
15+
const targets = globSync(`./targets/action/expo-target.config.@(json|js)`, {
1616
cwd: projectRoot,
1717
absolute: true,
1818
});
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

targets/action/assets/index.js

+17-35
Original file line numberDiff line numberDiff line change
@@ -15,48 +15,30 @@ class Action {
1515
}
1616

1717
finalize() {
18-
// debugger;
1918
try {
20-
// This method is run after the native code completes.
21-
22-
const usesNextJs = usesNext();
23-
24-
const name =
25-
getGenerator() ||
26-
(usesExpo() ? "Expo" : usesNextJs ? "Next.js" : "Unknown");
27-
28-
alert(`Uses: ${name}`);
19+
var script1 = document.createElement("script");
20+
script1.src = "//cdn.jsdelivr.net/npm/eruda";
21+
document.head.appendChild(script1);
22+
23+
// Once the first script is loaded, initialize eruda
24+
script1.onload = function () {
25+
var script2 = document.createElement("script");
26+
script2.textContent =
27+
"eruda.init({ theme: 'dracula' });eruda.show('elements');";
28+
document.head.appendChild(script2);
29+
};
30+
31+
// Handle any potential errors while loading the script
32+
script1.onerror = function (ev) {
33+
console.error("Error loading the eruda script.");
34+
alert(ev);
35+
};
2936
} catch (error) {
3037
console.error(error);
3138
alert(error);
3239
}
3340
}
3441
}
3542

36-
function getGenerator() {
37-
let generatorTag = document.querySelector('meta[name="generator"]');
38-
if (generatorTag) return generatorTag.getAttribute("content");
39-
40-
return null;
41-
}
42-
43-
function usesNext() {
44-
return (
45-
typeof next !== "undefined" ||
46-
typeof __NEXT_DATA__ !== "undefined" ||
47-
typeof __next_f !== "undefined" ||
48-
typeof __next_require__ !== "undefined"
49-
);
50-
}
51-
52-
function usesExpo() {
53-
return (
54-
typeof Expo !== "undefined" ||
55-
!!document.querySelector("#expo-generated-fonts") ||
56-
typeof $$require_external !== "undefined" ||
57-
typeof __BUNDLE_START_TIME__ !== "undefined"
58-
);
59-
}
60-
6143
// Must use var to ensure it's hoisted.
6244
window.ExtensionPreprocessingJS = new Action();

targets/action/expo-target.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @type {import('../../target-plugin/config').Config} */
22
module.exports = {
33
type: "action",
4-
name: "Detect Expo 𝝠",
4+
name: "Inspect Element",
55
icon: "../../assets/action.png",
66
colors: {
77
TouchBarBezel: "#DB739C",

0 commit comments

Comments
 (0)