Skip to content

Commit

Permalink
Experimental Safari version of uBOL
Browse files Browse the repository at this point in the history
Still unclear whether this is possible, many glitches and
quirks requiring investigation.
  • Loading branch information
gorhill committed Jan 7, 2025
1 parent 2266473 commit b8c363e
Show file tree
Hide file tree
Showing 19 changed files with 1,698 additions and 264 deletions.
30 changes: 0 additions & 30 deletions .eslintrc.yml

This file was deleted.

12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
run_options := $(filter-out $@,$(MAKECMDGOALS))

.PHONY: all clean cleanassets test lint chromium opera firefox npm dig \
mv3 mv3-quick mv3-chromium mv3-firefox \
mv3 mv3-quick mv3-chromium mv3-firefox mv3-safari \
compare maxcost medcost mincost modifiers record wasm

sources := $(wildcard assets/* assets/*/* dist/version src/* src/*/* src/*/*/* src/*/*/*/*)
Expand Down Expand Up @@ -33,10 +33,11 @@ dist/build/uBlock0.npm: tools/make-nodejs.sh $(sources) $(platform) $(assets)
tools/make-npm.sh

# Build the Node.js package.
npm: dist/build/uBlock0.npm
npm: node_modules/
npm install

lint: npm
cd dist/build/uBlock0.npm && npm run lint
npm run lint

test: npm
cd dist/build/uBlock0.npm && npm run test
Expand Down Expand Up @@ -66,6 +67,11 @@ dist/build/uBOLite.firefox: tools/make-mv3.sh $(sources) $(platform)

mv3-firefox: dist/build/uBOLite.firefox

dist/build/uBOLite.safari: tools/make-mv3.sh $(sources) $(platform)
tools/make-mv3.sh safari

mv3-safari: dist/build/uBOLite.safari

mv3-quick: tools/make-mv3.sh $(sources) $(platform)
tools/make-mv3.sh quick

Expand Down
47 changes: 47 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import js from "@eslint/js";
import globals from "globals";
import json from "@eslint/json";

export default [ {
files: ["**/*.js", "**/*.mjs"],
...js.configs.recommended,
}, {
files: ["**/*.js", "**/*.mjs"],
languageOptions: {
globals: {
...globals.browser,
browser: "readonly",
chrome: "readonly",
vAPI: "readonly",
},
sourceType: "module",
},
rules: {
eqeqeq: ["warn", "always"],
indent: ["error", 4, {
ignoredNodes: [
"Program > BlockStatement",
"Program > ExpressionStatement > CallExpression > ArrowFunctionExpression > BlockStatement",
"Program > ExpressionStatement > CallExpression > FunctionExpression > BlockStatement",
"Program > IfStatement > BlockStatement",
"Program > VariableDeclaration > VariableDeclarator > CallExpression > ArrowFunctionExpression > BlockStatement",
"CallExpression > MemberExpression",
"ArrayExpression > *",
"ObjectExpression > *",
],
}],

"no-control-regex": "off",
"no-empty": "off",
"sort-imports": "warn",
strict: "warn",
},
}, {
files: ["**/*.mjs"],
languageOptions: { sourceType: 'module' },
}, {
files: ["**/*.json"],
ignores: ["package-lock.json"],
language: "json/json",
...json.configs.recommended,
} ];
Loading

0 comments on commit b8c363e

Please sign in to comment.