diff --git a/Extensions/combined/manifest-safari.json b/Extensions/combined/manifest-safari.json new file mode 100644 index 0000000..4a38cb3 --- /dev/null +++ b/Extensions/combined/manifest-safari.json @@ -0,0 +1,36 @@ +{ + "name": "__MSG_extensionName__", + "description": "__MSG_extensionDesc__", + "default_locale": "en", + "version": "3.0.0.8", + "manifest_version": 2, + "background": { + "scripts": ["ryd.background.js"], + "persistent": false + }, + "icons": { + "48": "icons/icon48.png", + "128": "icons/icon128.png" + }, + "permissions": [ + "activeTab", + "*://*.youtube.com/*", + "storage", + "*://returnyoutubedislikeapi.com/*" + ], + "browser_action": { + "default_popup": "popup.html" + }, + "content_scripts": [ + { + "matches": ["*://*.youtube.com/*"], + "exclude_matches": ["*://*.music.youtube.com/*"], + "run_at": "document_idle", + "css": ["content-style.css"], + "js": ["ryd.content-script.js"] + } + ], + "options_ui": { + "page": "popup.html" + } +} diff --git a/package.json b/package.json index baea34d..f05958d 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "start": "echo To build for development, please use \"npm run dev\". To build for production, please use \"npm run build\".", "dev": "webpack --mode=production --watch", "build": "webpack --mode=production", + "build:safari": "webpack --mode=production && xcrun safari-web-extension-converter Extensions/combined/dist/safari --project-location Extensions/combined/dist --bundle-identifier com.returnyoutubedislike.safari-ext --force", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/webpack.config.js b/webpack.config.js index ef63fef..a333607 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -56,6 +56,17 @@ module.exports = { from: "./Extensions/combined/manifest-firefox.json", to: "./firefox/manifest.json", }, + { + from: "./Extensions/combined", + to: "./safari", + globOptions: { + ignore: ignorePatterns, + }, + }, + { + from: "./Extensions/combined/manifest-safari.json", + to: "./safari/manifest.json", + }, ], }), new FileManagerPlugin({ @@ -70,6 +81,10 @@ module.exports = { source: "./Extensions/combined/dist/**.js", destination: "./Extensions/combined/dist/chrome/", }, + { + source: "./Extensions/combined/dist/**.js", + destination: "./Extensions/combined/dist/safari/", + }, ], }, },