diff --git a/.gitignore b/.gitignore index aaabadd..4114975 100644 --- a/.gitignore +++ b/.gitignore @@ -202,3 +202,7 @@ publish *.xpi *.crx package-lock.json + + +.DS_Store +xcuserdata \ No newline at end of file diff --git a/build.js b/build.js index 231d6ae..6d61247 100644 --- a/build.js +++ b/build.js @@ -4,7 +4,7 @@ var JSZip = require('jszip'); var support = [ 'chrome', 'firefox', 'edge' ]; -var manifest_master = JSON.parse(fs.readFileSync('src/manifest.json', 'utf8')); +var manifest_master = JSON.parse(fs.readFileSync('src/manifest.core.json', 'utf8')); manifest_master.version = process.argv[2]; diff --git a/src/content_scripts/loader.js b/src/content_scripts/loader.js index 0fd3441..7f07ed8 100644 --- a/src/content_scripts/loader.js +++ b/src/content_scripts/loader.js @@ -54,7 +54,7 @@ var templates = [ ]; for (var i = 0, j = styles.length; i < j; i++) { - var styleURL = chrome.extension.getURL(styles[i]); + var styleURL = chrome.runtime.getURL(styles[i]); console.log('Loading', styleURL); var style = document.createElement('link'); style.id = namespace + '-css-' + i; @@ -65,7 +65,7 @@ } for (i = 0, j = templates.length; i < j; i++) { - var templateURL = chrome.extension.getURL(templates[i].url); + var templateURL = chrome.runtime.getURL(templates[i].url); console.log('Loading', templateURL); var template = document.createElement('script'); template.id = templates[i].id; @@ -93,7 +93,7 @@ }); for (i = 0, j = ajax.length; i < j; i++) { - var ajaxURL = chrome.extension.getURL(ajax[i]); + var ajaxURL = chrome.runtime.getURL(ajax[i]); console.log('Loading', ajaxURL); var script = document.createElement('script'); script.id = (namespace + '-ajax-' + ajax[i++]).replace('web_resources/', '').replace(/[. ]/, '-'); @@ -107,7 +107,7 @@ var loadScript = function() { if (scripts.length == 0) return; - var scriptURL = chrome.extension.getURL(scripts.pop()); + var scriptURL = chrome.runtime.getURL(scripts.pop()); console.log('Loading', scriptURL); var script = document.createElement('script'); script.id = namespace + '-js-' + i++; diff --git a/src/manifest.chrome.json b/src/manifest.chrome.json index 077404a..7a73a41 100644 --- a/src/manifest.chrome.json +++ b/src/manifest.chrome.json @@ -1,3 +1,2 @@ { - } \ No newline at end of file diff --git a/src/manifest.core.json b/src/manifest.core.json new file mode 100644 index 0000000..e2d26a7 --- /dev/null +++ b/src/manifest.core.json @@ -0,0 +1,88 @@ +{ + "description": "This extension improves the Hangar page on RobertsSpaceIndustries.com", + "name": "Star Citizen Hangar XPLORer", + "short_name": "HangarXPLOR", + "version": "0.0.0.1", + "author": "/u/alluran (Peter Dolkens)", + "icons": { + "128": "icons/icon_128.png" + }, + "manifest_version": 3, + "permissions": [ + "storage", + "unlimitedStorage" + ], + "host_permissions": [ + "https://robertsspaceindustries.com/*", + "https://www.robertsspaceindustries.com/*" + ], + "action": { + "default_icon": { + "48": "icons/icon_48-fill.png", + "128": "icons/icon_128-fill.png" + }, + "default_popup": "ui_resources/HangarXPLOR.Settings.html" + }, + "content_scripts": [ + { + "matches": [ + "https://robertsspaceindustries.com/account/pledges*", + "https://www.robertsspaceindustries.com/account/pledges*" + ], + "js": [ + "content_scripts/loader.js" + ], + "run_at": "document_end" + } + ], + "web_accessible_resources": [ + { + "matches": [ + "https://robertsspaceindustries.com/*", + "https://www.robertsspaceindustries.com/*" + ], + "resources": [ + "web_resources/ship-codes.json", + "web_resources/shims.chrome.storage.js", + "web_resources/fuse.min.js", + "web_resources/HangarXPLOR.BulkUI.js", + "web_resources/HangarXPLOR.Button.js", + "web_resources/HangarXPLOR.Components.js", + "web_resources/HangarXPLOR.DrawUI.js", + "web_resources/HangarXPLOR.Download.js", + "web_resources/HangarXPLOR.Dropdown.js", + "web_resources/HangarXPLOR.Filter.js", + "web_resources/HangarXPLOR.LoadPage.js", + "web_resources/HangarXPLOR.LoadCache.js", + "web_resources/HangarXPLOR.LoadSettings.js", + "web_resources/HangarXPLOR.Log.js", + "web_resources/HangarXPLOR.Pager.js", + "web_resources/HangarXPLOR.ParseComponent.js", + "web_resources/HangarXPLOR.ParseCoupon.js", + "web_resources/HangarXPLOR.ParseDecoration.js", + "web_resources/HangarXPLOR.ParseEquipment.js", + "web_resources/HangarXPLOR.ParseHangar.js", + "web_resources/HangarXPLOR.ParsePledge.js", + "web_resources/HangarXPLOR.ParseReward.js", + "web_resources/HangarXPLOR.ParseShip.js", + "web_resources/HangarXPLOR.ParseSkin.js", + "web_resources/HangarXPLOR.ParseUpgrade.js", + "web_resources/HangarXPLOR.PreProcess.js", + "web_resources/HangarXPLOR.ProcessPage.js", + "web_resources/HangarXPLOR.Render.js", + "web_resources/HangarXPLOR.SaveCache.js", + "web_resources/HangarXPLOR.SaveSettings.js", + "web_resources/HangarXPLOR.Search.js", + "web_resources/HangarXPLOR.SearchBox.js", + "web_resources/HangarXPLOR.Ships.js", + "web_resources/HangarXPLOR.Sort.js", + "web_resources/HangarXPLOR.Templates.js", + "web_resources/HangarXPLOR.Toggle.js", + "web_resources/HangarXPLOR.Debug.js", + "web_resources/HangarXPLOR.js", + "web_resources/HangarXPLOR.css", + "debug/*.html" + ] + } + ] +} \ No newline at end of file diff --git a/src/manifest.edge.json b/src/manifest.edge.json index 0e83ea4..ccbfde0 100644 --- a/src/manifest.edge.json +++ b/src/manifest.edge.json @@ -1,4 +1,5 @@ { + "manifest_version": 2, "-ms-preload": { "backgroundScript": "vendor/edge/backgroundScriptsAPIBridge.js", "contentScript": "vendor/edge/contentScriptsAPIBridge.js" diff --git a/src/manifest.firefox.json b/src/manifest.firefox.json index dfb7fa3..d857d82 100644 --- a/src/manifest.firefox.json +++ b/src/manifest.firefox.json @@ -3,5 +3,11 @@ "gecko": { "id": "HangarXPLOR@ddrit.com" } + }, + + "browser_specific_settings": { + "gecko": { + "id": "HangarXPLOR@ddrit.com" + } } } \ No newline at end of file diff --git a/src/manifest.json b/src/manifest.json index 5ac6904..a137564 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,69 +1,94 @@ { "description": "This extension improves the Hangar page on RobertsSpaceIndustries.com", - "manifest_version": 2, "name": "Star Citizen Hangar XPLORer", "short_name": "HangarXPLOR", "version": "0.0.0.1", - "author": "/u/alluran (Peter Dolkens)", - - "permissions": [ "https://robertsspaceindustries.com/*", "storage" ], - "icons": { "128": "icons/icon_128.png" }, - "browser_action": { - "default_icon": { - "48": "icons/icon_48-fill.png", - "128": "icons/icon_128-fill.png" - }, - "default_popup": "ui_resources/HangarXPLOR.Settings.html" + "manifest_version": 3, + "permissions": [ + "storage", + "unlimitedStorage" + ], + "host_permissions": [ + "https://robertsspaceindustries.com/*", + "https://www.robertsspaceindustries.com/*" + ], + "action": { + "default_icon": { + "48": "icons/icon_48-fill.png", + "128": "icons/icon_128-fill.png" + }, + "default_popup": "ui_resources/HangarXPLOR.Settings.html" }, - "content_scripts": [{ - "matches": ["https://robertsspaceindustries.com/account/pledges*", "https://www.robertsspaceindustries.com/account/pledges*"], - "js": ["content_scripts/loader.js"], - "run_at": "document_end" - }], + "content_scripts": [ + { + "matches": [ + "https://robertsspaceindustries.com/account/pledges*", + "https://www.robertsspaceindustries.com/account/pledges*" + ], + "js": [ + "content_scripts/loader.js" + ], + "run_at": "document_end" + } + ], "web_accessible_resources": [ - "web_resources/ship-codes.json", - "web_resources/shims.chrome.storage.js", - "web_resources/fuse.min.js", - "web_resources/HangarXPLOR.BulkUI.js", - "web_resources/HangarXPLOR.Button.js", - "web_resources/HangarXPLOR.Components.js", - "web_resources/HangarXPLOR.DrawUI.js", - "web_resources/HangarXPLOR.Download.js", - "web_resources/HangarXPLOR.Dropdown.js", - "web_resources/HangarXPLOR.Filter.js", - "web_resources/HangarXPLOR.LoadPage.js", - "web_resources/HangarXPLOR.LoadCache.js", - "web_resources/HangarXPLOR.LoadSettings.js", - "web_resources/HangarXPLOR.Log.js", - "web_resources/HangarXPLOR.Pager.js", - "web_resources/HangarXPLOR.ParseComponent.js", - "web_resources/HangarXPLOR.ParseCoupon.js", - "web_resources/HangarXPLOR.ParseDecoration.js", - "web_resources/HangarXPLOR.ParseEquipment.js", - "web_resources/HangarXPLOR.ParseHangar.js", - "web_resources/HangarXPLOR.ParsePledge.js", - "web_resources/HangarXPLOR.ParseReward.js", - "web_resources/HangarXPLOR.ParseShip.js", - "web_resources/HangarXPLOR.ParseSkin.js", - "web_resources/HangarXPLOR.ParseUpgrade.js", - "web_resources/HangarXPLOR.PreProcess.js", - "web_resources/HangarXPLOR.ProcessPage.js", - "web_resources/HangarXPLOR.Render.js", - "web_resources/HangarXPLOR.SaveCache.js", - "web_resources/HangarXPLOR.SaveSettings.js", - "web_resources/HangarXPLOR.Search.js", - "web_resources/HangarXPLOR.SearchBox.js", - "web_resources/HangarXPLOR.Ships.js", - "web_resources/HangarXPLOR.Sort.js", - "web_resources/HangarXPLOR.Templates.js", - "web_resources/HangarXPLOR.Toggle.js", - "web_resources/HangarXPLOR.Debug.js", - "web_resources/HangarXPLOR.js", - "web_resources/HangarXPLOR.css", - "debug/*.html" - ] + { + "matches": [ + "https://robertsspaceindustries.com/*", + "https://www.robertsspaceindustries.com/*" + ], + "resources": [ + "web_resources/ship-codes.json", + "web_resources/shims.chrome.storage.js", + "web_resources/fuse.min.js", + "web_resources/HangarXPLOR.BulkUI.js", + "web_resources/HangarXPLOR.Button.js", + "web_resources/HangarXPLOR.Components.js", + "web_resources/HangarXPLOR.DrawUI.js", + "web_resources/HangarXPLOR.Download.js", + "web_resources/HangarXPLOR.Dropdown.js", + "web_resources/HangarXPLOR.Filter.js", + "web_resources/HangarXPLOR.LoadPage.js", + "web_resources/HangarXPLOR.LoadCache.js", + "web_resources/HangarXPLOR.LoadSettings.js", + "web_resources/HangarXPLOR.Log.js", + "web_resources/HangarXPLOR.Pager.js", + "web_resources/HangarXPLOR.ParseComponent.js", + "web_resources/HangarXPLOR.ParseCoupon.js", + "web_resources/HangarXPLOR.ParseDecoration.js", + "web_resources/HangarXPLOR.ParseEquipment.js", + "web_resources/HangarXPLOR.ParseHangar.js", + "web_resources/HangarXPLOR.ParsePledge.js", + "web_resources/HangarXPLOR.ParseReward.js", + "web_resources/HangarXPLOR.ParseShip.js", + "web_resources/HangarXPLOR.ParseSkin.js", + "web_resources/HangarXPLOR.ParseUpgrade.js", + "web_resources/HangarXPLOR.PreProcess.js", + "web_resources/HangarXPLOR.ProcessPage.js", + "web_resources/HangarXPLOR.Render.js", + "web_resources/HangarXPLOR.SaveCache.js", + "web_resources/HangarXPLOR.SaveSettings.js", + "web_resources/HangarXPLOR.Search.js", + "web_resources/HangarXPLOR.SearchBox.js", + "web_resources/HangarXPLOR.Ships.js", + "web_resources/HangarXPLOR.Sort.js", + "web_resources/HangarXPLOR.Templates.js", + "web_resources/HangarXPLOR.Toggle.js", + "web_resources/HangarXPLOR.Debug.js", + "web_resources/HangarXPLOR.js", + "web_resources/HangarXPLOR.css", + "debug/*.html" + ] + } + ], + + "browser_specific_settings": { + "gecko": { + "id": "HangarXPLOR@ddrit.com" + } + } } \ No newline at end of file diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json b/src/vendor/safari/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/src/vendor/safari/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3cb9db1 --- /dev/null +++ b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,74 @@ +{ + "images" : [ + { + "size" : "1024x1024", + "idiom" : "universal", + "filename" : "universal-icon-1024@1x.png", + "platform" : "ios" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "mac-icon-16@1x.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "mac-icon-16@2x.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "mac-icon-32@1x.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "mac-icon-32@2x.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "mac-icon-128@1x.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "mac-icon-128@2x.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "mac-icon-256@1x.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "mac-icon-256@2x.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "mac-icon-512@1x.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "mac-icon-512@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png new file mode 100644 index 0000000..ce3fa6a Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png new file mode 100644 index 0000000..1c6bef0 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png new file mode 100644 index 0000000..58c4402 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png new file mode 100644 index 0000000..bdb180f Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png new file mode 100644 index 0000000..1c6bef0 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png new file mode 100644 index 0000000..09fd894 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png new file mode 100644 index 0000000..bdb180f Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png new file mode 100644 index 0000000..514bb01 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png new file mode 100644 index 0000000..09fd894 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png new file mode 100644 index 0000000..4c15ba2 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/universal-icon-1024@1x.png b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/universal-icon-1024@1x.png new file mode 100644 index 0000000..59f2081 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/AppIcon.appiconset/universal-icon-1024@1x.png differ diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/Contents.json b/src/vendor/safari/Shared (App)/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/src/vendor/safari/Shared (App)/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json b/src/vendor/safari/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json new file mode 100644 index 0000000..2c48e6e --- /dev/null +++ b/src/vendor/safari/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "icon_128.png" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/src/vendor/safari/Shared (App)/Assets.xcassets/LargeIcon.imageset/icon_128.png b/src/vendor/safari/Shared (App)/Assets.xcassets/LargeIcon.imageset/icon_128.png new file mode 100644 index 0000000..0aff429 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Assets.xcassets/LargeIcon.imageset/icon_128.png differ diff --git a/src/vendor/safari/Shared (App)/Base.lproj/Main.html b/src/vendor/safari/Shared (App)/Base.lproj/Main.html new file mode 100644 index 0000000..a683fb8 --- /dev/null +++ b/src/vendor/safari/Shared (App)/Base.lproj/Main.html @@ -0,0 +1,20 @@ + + + + + + + + + + + + + Star Citizen Hangar XPLORer Icon +

You can turn on Star Citizen Hangar XPLORer’s Safari extension in Settings.

+

You can turn on Star Citizen Hangar XPLORer’s extension in Safari Extensions preferences.

+

Star Citizen Hangar XPLORer’s extension is currently on. You can turn it off in Safari Extensions preferences.

+

Star Citizen Hangar XPLORer’s extension is currently off. You can turn it on in Safari Extensions preferences.

+ + + diff --git a/src/vendor/safari/Shared (App)/Resources/Icon.png b/src/vendor/safari/Shared (App)/Resources/Icon.png new file mode 100644 index 0000000..0aff429 Binary files /dev/null and b/src/vendor/safari/Shared (App)/Resources/Icon.png differ diff --git a/src/vendor/safari/Shared (App)/Resources/Script.js b/src/vendor/safari/Shared (App)/Resources/Script.js new file mode 100644 index 0000000..8e41a5c --- /dev/null +++ b/src/vendor/safari/Shared (App)/Resources/Script.js @@ -0,0 +1,24 @@ +function show(platform, enabled, useSettingsInsteadOfPreferences) { + document.body.classList.add(`platform-${platform}`); + + if (useSettingsInsteadOfPreferences) { + document.getElementsByClassName('platform-mac state-on')[0].innerText = "Star Citizen Hangar XPLORer’s extension is currently on. You can turn it off in the Extensions section of Safari Settings."; + document.getElementsByClassName('platform-mac state-off')[0].innerText = "Star Citizen Hangar XPLORer’s extension is currently off. You can turn it on in the Extensions section of Safari Settings."; + document.getElementsByClassName('platform-mac state-unknown')[0].innerText = "You can turn on Star Citizen Hangar XPLORer’s extension in the Extensions section of Safari Settings."; + document.getElementsByClassName('platform-mac open-preferences')[0].innerText = "Quit and Open Safari Settings…"; + } + + if (typeof enabled === "boolean") { + document.body.classList.toggle(`state-on`, enabled); + document.body.classList.toggle(`state-off`, !enabled); + } else { + document.body.classList.remove(`state-on`); + document.body.classList.remove(`state-off`); + } +} + +function openPreferences() { + webkit.messageHandlers.controller.postMessage("open-preferences"); +} + +document.querySelector("button.open-preferences").addEventListener("click", openPreferences); diff --git a/src/vendor/safari/Shared (App)/Resources/Style.css b/src/vendor/safari/Shared (App)/Resources/Style.css new file mode 100644 index 0000000..b6d0608 --- /dev/null +++ b/src/vendor/safari/Shared (App)/Resources/Style.css @@ -0,0 +1,61 @@ +* { + -webkit-user-select: none; + -webkit-user-drag: none; + cursor: default; +} + +:root { + color-scheme: light dark; + + --spacing: 20px; +} + +html { + height: 100%; +} + +body { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + + gap: var(--spacing); + margin: 0 calc(var(--spacing) * 2); + height: 100%; + + font: -apple-system-short-body; + text-align: center; +} + +body:not(.platform-mac, .platform-ios) :is(.platform-mac, .platform-ios) { + display: none; +} + +body.platform-ios .platform-mac { + display: none; +} + +body.platform-mac .platform-ios { + display: none; +} + +body.platform-ios .platform-mac { + display: none; +} + +body:not(.state-on, .state-off) :is(.state-on, .state-off) { + display: none; +} + +body.state-on :is(.state-off, .state-unknown) { + display: none; +} + +body.state-off :is(.state-on, .state-unknown) { + display: none; +} + +button { + font-size: 1em; +} diff --git a/src/vendor/safari/Shared (App)/ViewController.swift b/src/vendor/safari/Shared (App)/ViewController.swift new file mode 100644 index 0000000..9feb70f --- /dev/null +++ b/src/vendor/safari/Shared (App)/ViewController.swift @@ -0,0 +1,81 @@ +// +// ViewController.swift +// Shared (App) +// +// Created by Peter Dolkens on 28/12/2022. +// + +import WebKit + +#if os(iOS) +import UIKit +typealias PlatformViewController = UIViewController +#elseif os(macOS) +import Cocoa +import SafariServices +typealias PlatformViewController = NSViewController +#endif + +let extensionBundleIdentifier = "com.ddrit.Star-Citizen-Hangar-XPLORer.Extension" + +class ViewController: PlatformViewController, WKNavigationDelegate, WKScriptMessageHandler { + + @IBOutlet var webView: WKWebView! + + override func viewDidLoad() { + super.viewDidLoad() + + self.webView.navigationDelegate = self + +#if os(iOS) + self.webView.scrollView.isScrollEnabled = false +#endif + + self.webView.configuration.userContentController.add(self, name: "controller") + + self.webView.loadFileURL(Bundle.main.url(forResource: "Main", withExtension: "html")!, allowingReadAccessTo: Bundle.main.resourceURL!) + } + + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { +#if os(iOS) + webView.evaluateJavaScript("show('ios')") +#elseif os(macOS) + webView.evaluateJavaScript("show('mac')") + + SFSafariExtensionManager.getStateOfSafariExtension(withIdentifier: extensionBundleIdentifier) { (state, error) in + guard let state = state, error == nil else { + // Insert code to inform the user that something went wrong. + return + } + + DispatchQueue.main.async { + if #available(macOS 13, *) { + webView.evaluateJavaScript("show('mac', \(state.isEnabled), true)") + } else { + webView.evaluateJavaScript("show('mac', \(state.isEnabled), false)") + } + } + } +#endif + } + + func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { +#if os(macOS) + if (message.body as! String != "open-preferences") { + return; + } + + SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error in + guard error == nil else { + // Insert code to inform the user that something went wrong. + return + } + + DispatchQueue.main.async { + NSApplication.shared.terminate(nil) + } + } +#endif + } + +} diff --git a/src/vendor/safari/Shared (Extension)/SafariWebExtensionHandler.swift b/src/vendor/safari/Shared (Extension)/SafariWebExtensionHandler.swift new file mode 100644 index 0000000..c19461b --- /dev/null +++ b/src/vendor/safari/Shared (Extension)/SafariWebExtensionHandler.swift @@ -0,0 +1,26 @@ +// +// SafariWebExtensionHandler.swift +// Shared (Extension) +// +// Created by Peter Dolkens on 28/12/2022. +// + +import SafariServices +import os.log + +let SFExtensionMessageKey = "message" + +class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling { + + func beginRequest(with context: NSExtensionContext) { + let item = context.inputItems[0] as! NSExtensionItem + let message = item.userInfo?[SFExtensionMessageKey] + os_log(.default, "Received message from browser.runtime.sendNativeMessage: %@", message as! CVarArg) + + let response = NSExtensionItem() + response.userInfo = [ SFExtensionMessageKey: [ "Response to": message ] ] + + context.completeRequest(returningItems: [response], completionHandler: nil) + } + +} diff --git a/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.pbxproj b/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f4812d8 --- /dev/null +++ b/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.pbxproj @@ -0,0 +1,973 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + A37BF3C7295C07D100D00B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A37BF3C6295C07D100D00B06 /* AppDelegate.swift */; }; + A37BF3C9295C07D100D00B06 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A37BF3C8295C07D100D00B06 /* SceneDelegate.swift */; }; + A37BF3CC295C07D100D00B06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3CA295C07D100D00B06 /* LaunchScreen.storyboard */; }; + A37BF3CF295C07D100D00B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3CD295C07D100D00B06 /* Main.storyboard */; }; + A37BF3D8295C07D100D00B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A37BF3D7295C07D100D00B06 /* AppDelegate.swift */; }; + A37BF3DB295C07D100D00B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3D9295C07D100D00B06 /* Main.storyboard */; }; + A37BF3E3295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = A37BF3E2295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + A37BF3ED295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = A37BF3EC295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + A37BF3F3295C07D100D00B06 /* Main.html in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3B6295C07D000D00B06 /* Main.html */; }; + A37BF3F4295C07D100D00B06 /* Main.html in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3B6295C07D000D00B06 /* Main.html */; }; + A37BF3F5295C07D100D00B06 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3B8295C07D000D00B06 /* Icon.png */; }; + A37BF3F6295C07D100D00B06 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3B8295C07D000D00B06 /* Icon.png */; }; + A37BF3F7295C07D100D00B06 /* Style.css in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3B9295C07D000D00B06 /* Style.css */; }; + A37BF3F8295C07D100D00B06 /* Style.css in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3B9295C07D000D00B06 /* Style.css */; }; + A37BF3F9295C07D100D00B06 /* Script.js in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3BA295C07D000D00B06 /* Script.js */; }; + A37BF3FA295C07D100D00B06 /* Script.js in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3BA295C07D000D00B06 /* Script.js */; }; + A37BF3FB295C07D100D00B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A37BF3BB295C07D000D00B06 /* ViewController.swift */; }; + A37BF3FC295C07D100D00B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A37BF3BB295C07D000D00B06 /* ViewController.swift */; }; + A37BF3FD295C07D100D00B06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3BC295C07D100D00B06 /* Assets.xcassets */; }; + A37BF3FE295C07D100D00B06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A37BF3BC295C07D100D00B06 /* Assets.xcassets */; }; + A37BF3FF295C07D100D00B06 /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A37BF3BE295C07D100D00B06 /* SafariWebExtensionHandler.swift */; }; + A37BF400295C07D100D00B06 /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A37BF3BE295C07D100D00B06 /* SafariWebExtensionHandler.swift */; }; + A37BF41C295C07D100D00B06 /* screenshots in Resources */ = {isa = PBXBuildFile; fileRef = A37BF412295C07D100D00B06 /* screenshots */; }; + A37BF41D295C07D100D00B06 /* web_resources in Resources */ = {isa = PBXBuildFile; fileRef = A37BF413295C07D100D00B06 /* web_resources */; }; + A37BF41E295C07D100D00B06 /* manifest.firefox.json in Resources */ = {isa = PBXBuildFile; fileRef = A37BF414295C07D100D00B06 /* manifest.firefox.json */; }; + A37BF41F295C07D100D00B06 /* manifest.chrome.json in Resources */ = {isa = PBXBuildFile; fileRef = A37BF415295C07D100D00B06 /* manifest.chrome.json */; }; + A37BF420295C07D100D00B06 /* manifest.edge.json in Resources */ = {isa = PBXBuildFile; fileRef = A37BF416295C07D100D00B06 /* manifest.edge.json */; }; + A37BF421295C07D100D00B06 /* icons in Resources */ = {isa = PBXBuildFile; fileRef = A37BF417295C07D100D00B06 /* icons */; }; + A37BF422295C07D100D00B06 /* ui_resources in Resources */ = {isa = PBXBuildFile; fileRef = A37BF418295C07D100D00B06 /* ui_resources */; }; + A37BF423295C07D100D00B06 /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = A37BF419295C07D100D00B06 /* manifest.json */; }; + A37BF424295C07D100D00B06 /* (null) in Resources */ = {isa = PBXBuildFile; }; + A37BF425295C07D100D00B06 /* content_scripts in Resources */ = {isa = PBXBuildFile; fileRef = A37BF41B295C07D100D00B06 /* content_scripts */; }; + A37BF426295C07D100D00B06 /* screenshots in Resources */ = {isa = PBXBuildFile; fileRef = A37BF412295C07D100D00B06 /* screenshots */; }; + A37BF427295C07D100D00B06 /* web_resources in Resources */ = {isa = PBXBuildFile; fileRef = A37BF413295C07D100D00B06 /* web_resources */; }; + A37BF428295C07D100D00B06 /* manifest.firefox.json in Resources */ = {isa = PBXBuildFile; fileRef = A37BF414295C07D100D00B06 /* manifest.firefox.json */; }; + A37BF429295C07D100D00B06 /* manifest.chrome.json in Resources */ = {isa = PBXBuildFile; fileRef = A37BF415295C07D100D00B06 /* manifest.chrome.json */; }; + A37BF42A295C07D100D00B06 /* manifest.edge.json in Resources */ = {isa = PBXBuildFile; fileRef = A37BF416295C07D100D00B06 /* manifest.edge.json */; }; + A37BF42B295C07D100D00B06 /* icons in Resources */ = {isa = PBXBuildFile; fileRef = A37BF417295C07D100D00B06 /* icons */; }; + A37BF42C295C07D100D00B06 /* ui_resources in Resources */ = {isa = PBXBuildFile; fileRef = A37BF418295C07D100D00B06 /* ui_resources */; }; + A37BF42D295C07D100D00B06 /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = A37BF419295C07D100D00B06 /* manifest.json */; }; + A37BF42E295C07D100D00B06 /* (null) in Resources */ = {isa = PBXBuildFile; }; + A37BF42F295C07D100D00B06 /* content_scripts in Resources */ = {isa = PBXBuildFile; fileRef = A37BF41B295C07D100D00B06 /* content_scripts */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + A37BF3E4295C07D100D00B06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A37BF3B0295C07D000D00B06 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A37BF3E1295C07D100D00B06; + remoteInfo = "Star Citizen Hangar XPLORer Extension (iOS)"; + }; + A37BF3EE295C07D100D00B06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A37BF3B0295C07D000D00B06 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A37BF3EB295C07D100D00B06; + remoteInfo = "Star Citizen Hangar XPLORer Extension (macOS)"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + A37BF406295C07D100D00B06 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + A37BF3E3295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF40D295C07D100D00B06 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + A37BF3ED295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + A37BF3B7295C07D000D00B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = Base; path = ../Base.lproj/Main.html; sourceTree = ""; }; + A37BF3B8295C07D000D00B06 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; + A37BF3B9295C07D000D00B06 /* Style.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = Style.css; sourceTree = ""; }; + A37BF3BA295C07D000D00B06 /* Script.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = Script.js; sourceTree = ""; }; + A37BF3BB295C07D000D00B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + A37BF3BC295C07D100D00B06 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A37BF3BE295C07D100D00B06 /* SafariWebExtensionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariWebExtensionHandler.swift; sourceTree = ""; }; + A37BF3C3295C07D100D00B06 /* Star Citizen Hangar XPLORer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Star Citizen Hangar XPLORer.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + A37BF3C6295C07D100D00B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A37BF3C8295C07D100D00B06 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + A37BF3CB295C07D100D00B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + A37BF3CE295C07D100D00B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + A37BF3D0295C07D100D00B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A37BF3D5295C07D100D00B06 /* Star Citizen Hangar XPLORer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Star Citizen Hangar XPLORer.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + A37BF3D7295C07D100D00B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A37BF3DA295C07D100D00B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + A37BF3DC295C07D100D00B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A37BF3DD295C07D100D00B06 /* Star Citizen Hangar XPLORer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Star Citizen Hangar XPLORer.entitlements"; sourceTree = ""; }; + A37BF3E2295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Star Citizen Hangar XPLORer Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + A37BF3E7295C07D100D00B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A37BF3EC295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Star Citizen Hangar XPLORer Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + A37BF3F1295C07D100D00B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A37BF3F2295C07D100D00B06 /* Star Citizen Hangar XPLORer.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Star Citizen Hangar XPLORer.entitlements"; sourceTree = ""; }; + A37BF412295C07D100D00B06 /* screenshots */ = {isa = PBXFileReference; lastKnownFileType = folder; name = screenshots; path = ../../../screenshots; sourceTree = ""; }; + A37BF413295C07D100D00B06 /* web_resources */ = {isa = PBXFileReference; lastKnownFileType = folder; name = web_resources; path = ../../../web_resources; sourceTree = ""; }; + A37BF414295C07D100D00B06 /* manifest.firefox.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = manifest.firefox.json; path = ../../../manifest.firefox.json; sourceTree = ""; }; + A37BF415295C07D100D00B06 /* manifest.chrome.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = manifest.chrome.json; path = ../../../manifest.chrome.json; sourceTree = ""; }; + A37BF416295C07D100D00B06 /* manifest.edge.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = manifest.edge.json; path = ../../../manifest.edge.json; sourceTree = ""; }; + A37BF417295C07D100D00B06 /* icons */ = {isa = PBXFileReference; lastKnownFileType = folder; name = icons; path = ../../../icons; sourceTree = ""; }; + A37BF418295C07D100D00B06 /* ui_resources */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ui_resources; path = ../../../ui_resources; sourceTree = ""; }; + A37BF419295C07D100D00B06 /* manifest.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = manifest.json; path = ../../../manifest.json; sourceTree = ""; }; + A37BF41B295C07D100D00B06 /* content_scripts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = content_scripts; path = ../../../content_scripts; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A37BF3C0295C07D100D00B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3D2295C07D100D00B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3DF295C07D100D00B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3E9295C07D100D00B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A37BF3AF295C07D000D00B06 = { + isa = PBXGroup; + children = ( + A37BF3B4295C07D000D00B06 /* Shared (App) */, + A37BF3BD295C07D100D00B06 /* Shared (Extension) */, + A37BF3C5295C07D100D00B06 /* iOS (App) */, + A37BF3D6295C07D100D00B06 /* macOS (App) */, + A37BF3E6295C07D100D00B06 /* iOS (Extension) */, + A37BF3F0295C07D100D00B06 /* macOS (Extension) */, + A37BF3C4295C07D100D00B06 /* Products */, + ); + sourceTree = ""; + }; + A37BF3B4295C07D000D00B06 /* Shared (App) */ = { + isa = PBXGroup; + children = ( + A37BF3BB295C07D000D00B06 /* ViewController.swift */, + A37BF3BC295C07D100D00B06 /* Assets.xcassets */, + A37BF3B5295C07D000D00B06 /* Resources */, + ); + path = "Shared (App)"; + sourceTree = ""; + }; + A37BF3B5295C07D000D00B06 /* Resources */ = { + isa = PBXGroup; + children = ( + A37BF3B6295C07D000D00B06 /* Main.html */, + A37BF3B8295C07D000D00B06 /* Icon.png */, + A37BF3B9295C07D000D00B06 /* Style.css */, + A37BF3BA295C07D000D00B06 /* Script.js */, + ); + path = Resources; + sourceTree = ""; + }; + A37BF3BD295C07D100D00B06 /* Shared (Extension) */ = { + isa = PBXGroup; + children = ( + A37BF411295C07D100D00B06 /* Resources */, + A37BF3BE295C07D100D00B06 /* SafariWebExtensionHandler.swift */, + ); + path = "Shared (Extension)"; + sourceTree = ""; + }; + A37BF3C4295C07D100D00B06 /* Products */ = { + isa = PBXGroup; + children = ( + A37BF3C3295C07D100D00B06 /* Star Citizen Hangar XPLORer.app */, + A37BF3D5295C07D100D00B06 /* Star Citizen Hangar XPLORer.app */, + A37BF3E2295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex */, + A37BF3EC295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex */, + ); + name = Products; + sourceTree = ""; + }; + A37BF3C5295C07D100D00B06 /* iOS (App) */ = { + isa = PBXGroup; + children = ( + A37BF3C6295C07D100D00B06 /* AppDelegate.swift */, + A37BF3C8295C07D100D00B06 /* SceneDelegate.swift */, + A37BF3CA295C07D100D00B06 /* LaunchScreen.storyboard */, + A37BF3CD295C07D100D00B06 /* Main.storyboard */, + A37BF3D0295C07D100D00B06 /* Info.plist */, + ); + path = "iOS (App)"; + sourceTree = ""; + }; + A37BF3D6295C07D100D00B06 /* macOS (App) */ = { + isa = PBXGroup; + children = ( + A37BF3D7295C07D100D00B06 /* AppDelegate.swift */, + A37BF3D9295C07D100D00B06 /* Main.storyboard */, + A37BF3DC295C07D100D00B06 /* Info.plist */, + A37BF3DD295C07D100D00B06 /* Star Citizen Hangar XPLORer.entitlements */, + ); + path = "macOS (App)"; + sourceTree = ""; + }; + A37BF3E6295C07D100D00B06 /* iOS (Extension) */ = { + isa = PBXGroup; + children = ( + A37BF3E7295C07D100D00B06 /* Info.plist */, + ); + path = "iOS (Extension)"; + sourceTree = ""; + }; + A37BF3F0295C07D100D00B06 /* macOS (Extension) */ = { + isa = PBXGroup; + children = ( + A37BF3F1295C07D100D00B06 /* Info.plist */, + A37BF3F2295C07D100D00B06 /* Star Citizen Hangar XPLORer.entitlements */, + ); + path = "macOS (Extension)"; + sourceTree = ""; + }; + A37BF411295C07D100D00B06 /* Resources */ = { + isa = PBXGroup; + children = ( + A37BF412295C07D100D00B06 /* screenshots */, + A37BF413295C07D100D00B06 /* web_resources */, + A37BF414295C07D100D00B06 /* manifest.firefox.json */, + A37BF415295C07D100D00B06 /* manifest.chrome.json */, + A37BF416295C07D100D00B06 /* manifest.edge.json */, + A37BF417295C07D100D00B06 /* icons */, + A37BF418295C07D100D00B06 /* ui_resources */, + A37BF419295C07D100D00B06 /* manifest.json */, + A37BF41B295C07D100D00B06 /* content_scripts */, + ); + name = Resources; + path = "Shared (Extension)"; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A37BF3C2295C07D100D00B06 /* Star Citizen Hangar XPLORer (iOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = A37BF407295C07D100D00B06 /* Build configuration list for PBXNativeTarget "Star Citizen Hangar XPLORer (iOS)" */; + buildPhases = ( + A37BF3BF295C07D100D00B06 /* Sources */, + A37BF3C0295C07D100D00B06 /* Frameworks */, + A37BF3C1295C07D100D00B06 /* Resources */, + A37BF406295C07D100D00B06 /* Embed Foundation Extensions */, + ); + buildRules = ( + ); + dependencies = ( + A37BF3E5295C07D100D00B06 /* PBXTargetDependency */, + ); + name = "Star Citizen Hangar XPLORer (iOS)"; + productName = "Star Citizen Hangar XPLORer (iOS)"; + productReference = A37BF3C3295C07D100D00B06 /* Star Citizen Hangar XPLORer.app */; + productType = "com.apple.product-type.application"; + }; + A37BF3D4295C07D100D00B06 /* Star Citizen Hangar XPLORer (macOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = A37BF40E295C07D100D00B06 /* Build configuration list for PBXNativeTarget "Star Citizen Hangar XPLORer (macOS)" */; + buildPhases = ( + A37BF3D1295C07D100D00B06 /* Sources */, + A37BF3D2295C07D100D00B06 /* Frameworks */, + A37BF3D3295C07D100D00B06 /* Resources */, + A37BF40D295C07D100D00B06 /* Embed Foundation Extensions */, + ); + buildRules = ( + ); + dependencies = ( + A37BF3EF295C07D100D00B06 /* PBXTargetDependency */, + ); + name = "Star Citizen Hangar XPLORer (macOS)"; + productName = "Star Citizen Hangar XPLORer (macOS)"; + productReference = A37BF3D5295C07D100D00B06 /* Star Citizen Hangar XPLORer.app */; + productType = "com.apple.product-type.application"; + }; + A37BF3E1295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension (iOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = A37BF403295C07D100D00B06 /* Build configuration list for PBXNativeTarget "Star Citizen Hangar XPLORer Extension (iOS)" */; + buildPhases = ( + A37BF3DE295C07D100D00B06 /* Sources */, + A37BF3DF295C07D100D00B06 /* Frameworks */, + A37BF3E0295C07D100D00B06 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Star Citizen Hangar XPLORer Extension (iOS)"; + productName = "Star Citizen Hangar XPLORer Extension (iOS)"; + productReference = A37BF3E2295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex */; + productType = "com.apple.product-type.app-extension"; + }; + A37BF3EB295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension (macOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = A37BF40A295C07D100D00B06 /* Build configuration list for PBXNativeTarget "Star Citizen Hangar XPLORer Extension (macOS)" */; + buildPhases = ( + A37BF3E8295C07D100D00B06 /* Sources */, + A37BF3E9295C07D100D00B06 /* Frameworks */, + A37BF3EA295C07D100D00B06 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Star Citizen Hangar XPLORer Extension (macOS)"; + productName = "Star Citizen Hangar XPLORer Extension (macOS)"; + productReference = A37BF3EC295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension.appex */; + productType = "com.apple.product-type.app-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A37BF3B0295C07D000D00B06 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + A37BF3C2295C07D100D00B06 = { + CreatedOnToolsVersion = 14.2; + }; + A37BF3D4295C07D100D00B06 = { + CreatedOnToolsVersion = 14.2; + }; + A37BF3E1295C07D100D00B06 = { + CreatedOnToolsVersion = 14.2; + }; + A37BF3EB295C07D100D00B06 = { + CreatedOnToolsVersion = 14.2; + }; + }; + }; + buildConfigurationList = A37BF3B3295C07D000D00B06 /* Build configuration list for PBXProject "Star Citizen Hangar XPLORer" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = A37BF3AF295C07D000D00B06; + productRefGroup = A37BF3C4295C07D100D00B06 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A37BF3C2295C07D100D00B06 /* Star Citizen Hangar XPLORer (iOS) */, + A37BF3D4295C07D100D00B06 /* Star Citizen Hangar XPLORer (macOS) */, + A37BF3E1295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension (iOS) */, + A37BF3EB295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension (macOS) */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A37BF3C1295C07D100D00B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A37BF3F5295C07D100D00B06 /* Icon.png in Resources */, + A37BF3CC295C07D100D00B06 /* LaunchScreen.storyboard in Resources */, + A37BF3F3295C07D100D00B06 /* Main.html in Resources */, + A37BF3F9295C07D100D00B06 /* Script.js in Resources */, + A37BF3FD295C07D100D00B06 /* Assets.xcassets in Resources */, + A37BF3CF295C07D100D00B06 /* Main.storyboard in Resources */, + A37BF3F7295C07D100D00B06 /* Style.css in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3D3295C07D100D00B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A37BF3F6295C07D100D00B06 /* Icon.png in Resources */, + A37BF3F8295C07D100D00B06 /* Style.css in Resources */, + A37BF3DB295C07D100D00B06 /* Main.storyboard in Resources */, + A37BF3FA295C07D100D00B06 /* Script.js in Resources */, + A37BF3FE295C07D100D00B06 /* Assets.xcassets in Resources */, + A37BF3F4295C07D100D00B06 /* Main.html in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3E0295C07D100D00B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A37BF42E295C07D100D00B06 /* (null) in Resources */, + A37BF428295C07D100D00B06 /* manifest.firefox.json in Resources */, + A37BF426295C07D100D00B06 /* screenshots in Resources */, + A37BF42F295C07D100D00B06 /* content_scripts in Resources */, + A37BF42A295C07D100D00B06 /* manifest.edge.json in Resources */, + A37BF42B295C07D100D00B06 /* icons in Resources */, + A37BF42D295C07D100D00B06 /* manifest.json in Resources */, + A37BF42C295C07D100D00B06 /* ui_resources in Resources */, + A37BF427295C07D100D00B06 /* web_resources in Resources */, + A37BF429295C07D100D00B06 /* manifest.chrome.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3EA295C07D100D00B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A37BF424295C07D100D00B06 /* (null) in Resources */, + A37BF41E295C07D100D00B06 /* manifest.firefox.json in Resources */, + A37BF41C295C07D100D00B06 /* screenshots in Resources */, + A37BF425295C07D100D00B06 /* content_scripts in Resources */, + A37BF420295C07D100D00B06 /* manifest.edge.json in Resources */, + A37BF421295C07D100D00B06 /* icons in Resources */, + A37BF423295C07D100D00B06 /* manifest.json in Resources */, + A37BF422295C07D100D00B06 /* ui_resources in Resources */, + A37BF41D295C07D100D00B06 /* web_resources in Resources */, + A37BF41F295C07D100D00B06 /* manifest.chrome.json in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A37BF3BF295C07D100D00B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A37BF3FB295C07D100D00B06 /* ViewController.swift in Sources */, + A37BF3C7295C07D100D00B06 /* AppDelegate.swift in Sources */, + A37BF3C9295C07D100D00B06 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3D1295C07D100D00B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A37BF3FC295C07D100D00B06 /* ViewController.swift in Sources */, + A37BF3D8295C07D100D00B06 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3DE295C07D100D00B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A37BF3FF295C07D100D00B06 /* SafariWebExtensionHandler.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A37BF3E8295C07D100D00B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A37BF400295C07D100D00B06 /* SafariWebExtensionHandler.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + A37BF3E5295C07D100D00B06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A37BF3E1295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension (iOS) */; + targetProxy = A37BF3E4295C07D100D00B06 /* PBXContainerItemProxy */; + }; + A37BF3EF295C07D100D00B06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A37BF3EB295C07D100D00B06 /* Star Citizen Hangar XPLORer Extension (macOS) */; + targetProxy = A37BF3EE295C07D100D00B06 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + A37BF3B6295C07D000D00B06 /* Main.html */ = { + isa = PBXVariantGroup; + children = ( + A37BF3B7295C07D000D00B06 /* Base */, + ); + name = Main.html; + sourceTree = ""; + }; + A37BF3CA295C07D100D00B06 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A37BF3CB295C07D100D00B06 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + A37BF3CD295C07D100D00B06 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A37BF3CE295C07D100D00B06 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + A37BF3D9295C07D100D00B06 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A37BF3DA295C07D100D00B06 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A37BF401295C07D100D00B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + A37BF402295C07D100D00B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + A37BF404295C07D100D00B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "iOS (Extension)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Star Citizen Hangar XPLORer Extension"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.ddrit.hangarxplor.extension; + PRODUCT_NAME = "Star Citizen Hangar XPLORer Extension"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + A37BF405295C07D100D00B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "iOS (Extension)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Star Citizen Hangar XPLORer Extension"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.ddrit.hangarxplor.extension; + PRODUCT_NAME = "Star Citizen Hangar XPLORer Extension"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A37BF408295C07D100D00B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "iOS (App)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Star Citizen Hangar XPLORer"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + "-framework", + WebKit, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.ddrit.hangarxplor; + PRODUCT_NAME = "Star Citizen Hangar XPLORer"; + SDKROOT = iphoneos; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + A37BF409295C07D100D00B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "iOS (App)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Star Citizen Hangar XPLORer"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + "-framework", + WebKit, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.ddrit.hangarxplor; + PRODUCT_NAME = "Star Citizen Hangar XPLORer"; + SDKROOT = iphoneos; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A37BF40B295C07D100D00B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "macOS (Extension)/Star Citizen Hangar XPLORer.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "macOS (Extension)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Star Citizen Hangar XPLORer Extension"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@executable_path/../../../../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.ddrit.hangarxplor.extension; + PRODUCT_NAME = "Star Citizen Hangar XPLORer Extension"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + A37BF40C295C07D100D00B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "macOS (Extension)/Star Citizen Hangar XPLORer.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "macOS (Extension)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Star Citizen Hangar XPLORer Extension"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@executable_path/../../../../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.ddrit.hangarxplor.extension; + PRODUCT_NAME = "Star Citizen Hangar XPLORer Extension"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + A37BF40F295C07D100D00B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "macOS (App)/Star Citizen Hangar XPLORer.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "macOS (App)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Star Citizen Hangar XPLORer"; + INFOPLIST_KEY_NSMainStoryboardFile = Main; + INFOPLIST_KEY_NSPrincipalClass = NSApplication; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + "-framework", + WebKit, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.ddrit.hangarxplor; + PRODUCT_NAME = "Star Citizen Hangar XPLORer"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + A37BF410295C07D100D00B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "macOS (App)/Star Citizen Hangar XPLORer.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "macOS (App)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Star Citizen Hangar XPLORer"; + INFOPLIST_KEY_NSMainStoryboardFile = Main; + INFOPLIST_KEY_NSPrincipalClass = NSApplication; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + "-framework", + WebKit, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.ddrit.hangarxplor; + PRODUCT_NAME = "Star Citizen Hangar XPLORer"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A37BF3B3295C07D000D00B06 /* Build configuration list for PBXProject "Star Citizen Hangar XPLORer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A37BF401295C07D100D00B06 /* Debug */, + A37BF402295C07D100D00B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A37BF403295C07D100D00B06 /* Build configuration list for PBXNativeTarget "Star Citizen Hangar XPLORer Extension (iOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A37BF404295C07D100D00B06 /* Debug */, + A37BF405295C07D100D00B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A37BF407295C07D100D00B06 /* Build configuration list for PBXNativeTarget "Star Citizen Hangar XPLORer (iOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A37BF408295C07D100D00B06 /* Debug */, + A37BF409295C07D100D00B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A37BF40A295C07D100D00B06 /* Build configuration list for PBXNativeTarget "Star Citizen Hangar XPLORer Extension (macOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A37BF40B295C07D100D00B06 /* Debug */, + A37BF40C295C07D100D00B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A37BF40E295C07D100D00B06 /* Build configuration list for PBXNativeTarget "Star Citizen Hangar XPLORer (macOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A37BF40F295C07D100D00B06 /* Debug */, + A37BF410295C07D100D00B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A37BF3B0295C07D000D00B06 /* Project object */; +} diff --git a/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/src/vendor/safari/Star Citizen Hangar XPLORer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/src/vendor/safari/iOS (App)/AppDelegate.swift b/src/vendor/safari/iOS (App)/AppDelegate.swift new file mode 100644 index 0000000..f7457c1 --- /dev/null +++ b/src/vendor/safari/iOS (App)/AppDelegate.swift @@ -0,0 +1,24 @@ +// +// AppDelegate.swift +// iOS (App) +// +// Created by Peter Dolkens on 28/12/2022. +// + +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + +} diff --git a/src/vendor/safari/iOS (App)/Base.lproj/LaunchScreen.storyboard b/src/vendor/safari/iOS (App)/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..620a70c --- /dev/null +++ b/src/vendor/safari/iOS (App)/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/vendor/safari/iOS (App)/Base.lproj/Main.storyboard b/src/vendor/safari/iOS (App)/Base.lproj/Main.storyboard new file mode 100644 index 0000000..618dfce --- /dev/null +++ b/src/vendor/safari/iOS (App)/Base.lproj/Main.storyboard @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/vendor/safari/iOS (App)/Info.plist b/src/vendor/safari/iOS (App)/Info.plist new file mode 100644 index 0000000..d1a2bff --- /dev/null +++ b/src/vendor/safari/iOS (App)/Info.plist @@ -0,0 +1,27 @@ + + + + + SFSafariWebExtensionConverterVersion + 14.2 + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/src/vendor/safari/iOS (App)/SceneDelegate.swift b/src/vendor/safari/iOS (App)/SceneDelegate.swift new file mode 100644 index 0000000..49f9f19 --- /dev/null +++ b/src/vendor/safari/iOS (App)/SceneDelegate.swift @@ -0,0 +1,18 @@ +// +// SceneDelegate.swift +// iOS (App) +// +// Created by Peter Dolkens on 28/12/2022. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + guard let _ = (scene as? UIWindowScene) else { return } + } + +} diff --git a/src/vendor/safari/iOS (Extension)/Info.plist b/src/vendor/safari/iOS (Extension)/Info.plist new file mode 100644 index 0000000..9ee504d --- /dev/null +++ b/src/vendor/safari/iOS (Extension)/Info.plist @@ -0,0 +1,13 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.Safari.web-extension + NSExtensionPrincipalClass + $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler + + + diff --git a/src/vendor/safari/macOS (App)/AppDelegate.swift b/src/vendor/safari/macOS (App)/AppDelegate.swift new file mode 100644 index 0000000..eb075e0 --- /dev/null +++ b/src/vendor/safari/macOS (App)/AppDelegate.swift @@ -0,0 +1,21 @@ +// +// AppDelegate.swift +// macOS (App) +// +// Created by Peter Dolkens on 28/12/2022. +// + +import Cocoa + +@main +class AppDelegate: NSObject, NSApplicationDelegate { + + func applicationDidFinishLaunching(_ notification: Notification) { + // Override point for customization after application launch. + } + + func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } + +} diff --git a/src/vendor/safari/macOS (App)/Base.lproj/Main.storyboard b/src/vendor/safari/macOS (App)/Base.lproj/Main.storyboard new file mode 100644 index 0000000..a73c53d --- /dev/null +++ b/src/vendor/safari/macOS (App)/Base.lproj/Main.storyboard @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/vendor/safari/macOS (App)/Info.plist b/src/vendor/safari/macOS (App)/Info.plist new file mode 100644 index 0000000..7f3df1d --- /dev/null +++ b/src/vendor/safari/macOS (App)/Info.plist @@ -0,0 +1,8 @@ + + + + + SFSafariWebExtensionConverterVersion + 14.2 + + diff --git a/src/vendor/safari/macOS (App)/Star Citizen Hangar XPLORer.entitlements b/src/vendor/safari/macOS (App)/Star Citizen Hangar XPLORer.entitlements new file mode 100644 index 0000000..625af03 --- /dev/null +++ b/src/vendor/safari/macOS (App)/Star Citizen Hangar XPLORer.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client + + + diff --git a/src/vendor/safari/macOS (Extension)/Info.plist b/src/vendor/safari/macOS (Extension)/Info.plist new file mode 100644 index 0000000..9ee504d --- /dev/null +++ b/src/vendor/safari/macOS (Extension)/Info.plist @@ -0,0 +1,13 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.Safari.web-extension + NSExtensionPrincipalClass + $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler + + + diff --git a/src/vendor/safari/macOS (Extension)/Star Citizen Hangar XPLORer.entitlements b/src/vendor/safari/macOS (Extension)/Star Citizen Hangar XPLORer.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/src/vendor/safari/macOS (Extension)/Star Citizen Hangar XPLORer.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/src/web_resources/HangarXPLOR.ParsePledge.js b/src/web_resources/HangarXPLOR.ParsePledge.js index 242d83d..44fa6fc 100644 --- a/src/web_resources/HangarXPLOR.ParsePledge.js +++ b/src/web_resources/HangarXPLOR.ParsePledge.js @@ -18,7 +18,7 @@ HangarXPLOR.ParsePledge = function() var pledgeName = $('.js-pledge-name', this).val() || ''; var $wrapper = $('.wrapper-col', this); - var h3Text = $('h3', this).contents().filter(function() { return this.nodeType == 3 && this.nodeValue.trim().length > 0 })[0]; + var h3Text = $('.title-col h3', this)[0]; if (pledgeName.length > 0) {