Skip to content

Commit

Permalink
Fix formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
david-tejada committed Oct 9, 2024
1 parent 842b3f3 commit d15852a
Show file tree
Hide file tree
Showing 28 changed files with 223 additions and 187 deletions.
55 changes: 35 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ npm install

## Running the extension

Depending on the target browser, you need to build the extension for Manifest version 2 or 3.
Depending on the target browser, you need to build the extension for Manifest
version 2 or 3.

This can be done with:

- `npm run-script watch` - where the extension will be built into the directory `dist-mv2`
- `npm run-script watch:mv3` - where the extension will be built into the directory `dist-mv3`
- `npm run-script watch` - where the extension will be built into the directory
`dist-mv2`
- `npm run-script watch:mv3` - where the extension will be built into the
directory `dist-mv3`

You can then follow the guide for how to load the extension into your browser of choice.
You can then follow the guide for how to load the extension into your browser of
choice.

The project includes scripts for running the extension in Firefox and Chromium using the [WebExtension tool](https://github.com/mozilla/web-ext) for your convenience.
The project includes scripts for running the extension in Firefox and Chromium
using the [WebExtension tool](https://github.com/mozilla/web-ext) for your
convenience.

### Firefox

Expand All @@ -35,7 +41,8 @@ npm run-script watch:mv3
npm run-script start:chromium
```

To launch alternative Chromium browsers like Edge or Brave you can append the path to the binary suitable for your operating system:
To launch alternative Chromium browsers like Edge or Brave you can append the
path to the binary suitable for your operating system:

_This example is for launching Brave on MacOS_

Expand All @@ -45,35 +52,43 @@ npm run-script start:chromium -- --chromium-binary /Applications/Brave\ Browser.

### Safari

Safari [only supports web extensions](https://developer.apple.com/documentation/safariservices/safari_web_extensions) bundled inside a native Mac app. If you are *not* building for development, Safari [only loads web extensions if their containing apps are distributed via the Mac App Store](https://developer.apple.com/documentation/safariservices/safari_web_extensions/distributing_your_safari_web_extension), or [if you select “Allow unsigned extensionsʺ from the Debug menu on each launch](https://developer.apple.com/documentation/safariservices/safari_web_extensions/running_your_safari_web_extension) (requires authentication).
Safari
[only supports web extensions](https://developer.apple.com/documentation/safariservices/safari_web_extensions)
bundled inside a native Mac app. If you are _not_ building for development,
Safari
[only loads web extensions if their containing apps are distributed via the Mac App Store](https://developer.apple.com/documentation/safariservices/safari_web_extensions/distributing_your_safari_web_extension),
or
[if you select “Allow unsigned extensionsʺ from the Debug menu on each launch](https://developer.apple.com/documentation/safariservices/safari_web_extensions/running_your_safari_web_extension)
(requires authentication).

To build for development:

1. Build the extension for manifest version 2:

```bash
npm run build:mv2-safari
```
```bash
npm run build:mv2-safari
```

2. Update the project's marketing version from the manifest.
```bash
swift Rango/Build/UpdateRangoVersion.swift
```
```bash
swift Rango/Build/UpdateRangoVersion.swift
```
3. Copy the template xcconfig to a user-specific one.
```bash
cp Rango/Build/UserSpecific{.template,}.xcconfig
```
```bash
cp Rango/Build/UserSpecific{.template,}.xcconfig
```
4. Open the Rango project in Xcode.
```bash
xed Rango
```
```bash
xed Rango
```
5. Edit `Build` » `UserSpecific.xcconfig` according to the comments in the file.
6. Build and run the project.
7. Enable the extension in Safari’s Preferences.
7. Enable the extension in Safari’s Preferences.
13 changes: 9 additions & 4 deletions PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@

## Introduction

This Privacy Policy outlines the types of information we don’t collect from users of our extension "Rango" and the macOS app "Rango for Safari".
This Privacy Policy outlines the types of information we don’t collect from
users of our extension "Rango" and the macOS app "Rango for Safari".

## No Collection of Personal Information

Rango does not collect, store, or share any personal information. We do not have any features or functionalities that gather personal data from our users, nor do we track user behavior.
Rango does not collect, store, or share any personal information. We do not have
any features or functionalities that gather personal data from our users, nor do
we track user behavior.

## No Collection of Non-Personal Information

Rango does not collect non-personal data like usage data, cookies, or data from similar technologies.
Rango does not collect non-personal data like usage data, cookies, or data from
similar technologies.

## No Third-party Access or Sharing

Since we don't collect any information, there's no data to share with third parties.
Since we don't collect any information, there's no data to share with third
parties.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
"colors": [
{
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
}
}
132 changes: 66 additions & 66 deletions Rango/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
{
"images" : [
{
"filename" : "mac-icon-16@1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "mac-icon-16@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "mac-icon-32@1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "mac-icon-32@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "mac-icon-128@1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "mac-icon-128@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "mac-icon-256@1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "mac-icon-256@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "mac-icon-512@1x.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "mac-icon-512@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
"images": [
{
"filename": "mac-icon-16@1x.png",
"idiom": "mac",
"scale": "1x",
"size": "16x16"
},
{
"filename": "mac-icon-16@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "16x16"
},
{
"filename": "mac-icon-32@1x.png",
"idiom": "mac",
"scale": "1x",
"size": "32x32"
},
{
"filename": "mac-icon-32@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "32x32"
},
{
"filename": "mac-icon-128@1x.png",
"idiom": "mac",
"scale": "1x",
"size": "128x128"
},
{
"filename": "mac-icon-128@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "128x128"
},
{
"filename": "mac-icon-256@1x.png",
"idiom": "mac",
"scale": "1x",
"size": "256x256"
},
{
"filename": "mac-icon-256@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "256x256"
},
{
"filename": "mac-icon-512@1x.png",
"idiom": "mac",
"scale": "1x",
"size": "512x512"
},
{
"filename": "mac-icon-512@2x.png",
"idiom": "mac",
"scale": "2x",
"size": "512x512"
}
],
"info": {
"author": "xcode",
"version": 1
}
}
8 changes: 4 additions & 4 deletions Rango/Shared (App)/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
"info": {
"author": "xcode",
"version": 1
}
}
40 changes: 20 additions & 20 deletions Rango/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "icon128.21ef1976.png"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "icon128.21ef1976.png"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
50 changes: 34 additions & 16 deletions Rango/Shared (App)/Base.lproj/Main.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'" />

<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta
name="viewport"
content="width=device-width, initial-scale=1, user-scalable=no"
/>

<link rel="stylesheet" href="../Style.css">
<script src="../Script.js" defer></script>
</head>
<body>
<img src="../Icon.png" width="128" height="128" alt="Rango Icon">
<p class="platform-mac state-unknown">You can turn on Rango’s extension in <span class="safari-extensions-settings"></span>.</p>
<p class="platform-mac state-on">Rango’s extension is currently on. You can turn it off in <span class="safari-extensions-settings"></span>.</p>
<p class="platform-mac state-on">To open Rango’s settings, Control-click its Safari toolbar icon and select <b>Manage Extension…</b>, then click the <b>Settings</b> button.</p>
<p class="platform-mac state-off">Rango’s extension is currently off. You can turn it on in <span class="safari-extensions-settings"></span>.</p>
<button class="platform-mac open-preferences">Quit and Open <span class="safari-extensions-settings capitalized"></span></button>
</body>
<link rel="stylesheet" href="../Style.css" />
<script src="../Script.js" defer></script>
</head>
<body>
<img src="../Icon.png" width="128" height="128" alt="Rango Icon" />
<p class="platform-mac state-unknown">
You can turn on Rango’s extension in
<span class="safari-extensions-settings"></span>.
</p>
<p class="platform-mac state-on">
Rango’s extension is currently on. You can turn it off in
<span class="safari-extensions-settings"></span>.
</p>
<p class="platform-mac state-on">
To open Rango’s settings, Control-click its Safari toolbar icon and select
<b>Manage Extension…</b>, then click the <b>Settings</b> button.
</p>
<p class="platform-mac state-off">
Rango’s extension is currently off. You can turn it on in
<span class="safari-extensions-settings"></span>.
</p>
<button class="platform-mac open-preferences">
Quit and Open
<span class="safari-extensions-settings capitalized"></span>
</button>
</body>
</html>
2 changes: 1 addition & 1 deletion Rango/Shared (App)/Resources/Script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function hasPreferences() {
document.body.classList.add(`has-preferences`);
document.body.classList.add(`has-preferences`);
}

function show(platform, enabled) {
Expand Down
Loading

0 comments on commit d15852a

Please sign in to comment.