Skip to content

Commit

Permalink
73 project rename (#74)
Browse files Browse the repository at this point in the history
* Rename project references
  • Loading branch information
Seismix authored Sep 19, 2024
1 parent 099c330 commit d744695
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RoyalRecap
# RoyalRefresh

A web extension for [royalroad.com](https://royalroad.com). For people who juggle multiple stories.

Expand All @@ -10,27 +10,27 @@ about what happened in the last chapter of the story I just opened. More and mor
chapter and scroll all the way down just to re-read the last few paragraphs as a refresher. This is especially annoying
while on mobile, where I often read while on the train.

That's when decided on trying to implement this little idea of a small recap function.
That's when decided on trying to implement this little idea implementing a refresh of what happened in the last chapter.

## What is it?

RoyalRecap is a browser extension for [royalroad.com](https://royalroad.com)
RoyalRefresh is a browser extension for [royalroad.com](https://royalroad.com)
that inserts a button next to RoyalRoad's "Reader Preferences" button. When clicked, the last few paragraphs of the
previous chapter get fetched and displayed at the top of the chapter, which you can toggle on and off using the button.
The extension defaults to showing you the last 250 words of the previous chapter (adjustable in extension settings,
[see Settings](#settings)).

Here's an example of what it looks like:

![Recap example](docs/recap_example.png)
![Refresh example](docs/recap_example.png)

## Settings

The extension comes with a settings page where you can adjust the recap length and other settings.
The extension comes with a settings page where you can adjust the refresh length and other settings.
There are a few ways to access the settings page:

1. Click the extension icon in the browser toolbar to open the popup (Recommended)
1. Open RoyalRoad's "Reader Preferences" menu and click "Open RoyalRecap settings"
1. Open RoyalRoad's "Reader Preferences" menu and click "Open RoyalRefresh settings"
1. Depending on your browser, there may be alternative methods to access the extension settings,
(such as using `about:addons` in Firefox)

Expand All @@ -39,14 +39,14 @@ The settings page looks like this:
![Settings page](docs/basic_settings.png)

Advanced users can take advanced of the "Advanced options" toggle to reveal more settings. In case the website gets an
update, the user can adjust the CSS selectors to make the extension work again, until a new update of RoyalRecap is
update, the user can adjust the CSS selectors to make the extension work again, until a new update of RoyalRefresh is
released with the adjusted defaults:

![Advanced settings](docs/advanced_settings.png)

## Bug reports & Ideas

Check out everything I'm tracking in this project's [issues](https://github.com/Seismix/royalrecap/issues/).
Check out everything I'm tracking in this project's [issues](https://github.com/Seismix/royalrefresh/issues/).

This is my first public repo, for now and until changes are needed, just create a issue with an appropriate label and a
descriptive message and I will take a look. Any contributions are welcome, issues where I specifically need help are
Expand Down
10 changes: 5 additions & 5 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"{{chrome}}.manifest_version": 3,
"{{firefox}}.manifest_version": 2,
"name": "RoyalRecap",
"name": "RoyalRefresh",
"description": "A web extension for royalroad.com. For people who juggle multiple stories",
"homepage_url": "https://github.com/Seismix/royalrecap",
"homepage_url": "https://github.com/Seismix/royalrefresh",
"{{chrome}}.action": {
"default_title": "RoyalRecap",
"default_title": "RoyalRefresh",
"default_popup": "ui/options.html"
},
"{{firefox}}.browser_action": {
"default_title": "RoyalRecap",
"default_title": "RoyalRefresh",
"default_popup": "ui/options.html"
},
"content_scripts": [
{
"matches": ["*://*.royalroad.com/*"],
"js": ["scripts/royalrecap.ts"],
"js": ["scripts/content.ts"],
"run_at": "document_end"
}
],
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "royalrecap",
"name": "royalrefresh",
"version": "1.0.0",
"description": "A web extension for royalroad.com. For people who juggle multiple stories",
"main": "background.js",
Expand All @@ -20,7 +20,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/Seismix/royalrecap.git"
"url": "git+https://github.com/Seismix/royalrefresh.git"
},
"keywords": [
"royal",
Expand All @@ -34,9 +34,9 @@
"author": "Seismix",
"license": "MIT",
"bugs": {
"url": "https://github.com/Seismix/royalrecap/issues"
"url": "https://github.com/Seismix/royalrefresh/issues"
},
"homepage": "https://github.com/Seismix/royalrecap#readme",
"homepage": "https://github.com/Seismix/royalrefresh#readme",
"devDependencies": {
"@playwright/test": "^1.46.1",
"@types/firefox-webext-browser": "^120.0.4",
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/royalrecap.ts → src/scripts/content.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExtensionSettings, ExtensionSettingsKeys } from "@royalrecap/types"
import { ExtensionSettings, ExtensionSettingsKeys } from "@royalrefresh/types"
import browser from "webextension-polyfill"
import DEFAULTS from "./defaults"

Expand Down Expand Up @@ -191,7 +191,7 @@ function createBlurbButton() {
function createSettingsButton() {
const button = document.createElement("button")
button.id = SETTINGS_BUTTON_ID
button.textContent = "Open RoyalRecap Settings"
button.textContent = "Open RoyalRefresh Settings"
button.classList.add("btn", "btn-circle", "red")

button.style.marginRight = "auto"
Expand Down Expand Up @@ -276,7 +276,7 @@ function createRecapFragment(prevChapterHtml: string) {
// Fiction title
const recapHeading = extractFictionTitle()
const recapHeadingElement = document.createElement("h1")
recapHeadingElement.textContent = `RoyalRecap of ${recapHeading}`
recapHeadingElement.textContent = `RoyalRefresh of ${recapHeading}`

// Previous chapter name
const recapChapterName = extractChapterName(doc)
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExtensionSettings } from "@royalrecap/types"
import { ExtensionSettings } from "@royalrefresh/types"

const DEFAULTS: ExtensionSettings = {
wordCount: 250,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="options.css" />
<title>RoyalRecap Options</title>
<title>RoyalRefresh Options</title>
</head>

<body>
<div class="container">
<h3>RoyalRecap Settings Page</h3>
<h3>RoyalRefresh Settings Page</h3>
<p>Adjust the different values to your liking.</p>
<p>
The current values are displayed in the respective input fields.
Expand Down
2 changes: 1 addition & 1 deletion src/ui/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
DisplayMessageType,
ExtensionSettings,
ExtensionSettingsPossibleTypes,
} from "@royalrecap/types"
} from "@royalrefresh/types"

/**
* Load the extension options from the `browser.storage` and set them to the form elements in options.html
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"outDir": "./dist",
"baseUrl": "./",
"paths": {
"@royalrecap/types": ["./src/types/types"]
"@royalrefresh/types": ["./src/types/types"]
}
},
"include": ["./src/**/*.ts", "./src/**/*.js"],
Expand Down

0 comments on commit d744695

Please sign in to comment.