Compare commits
No commits in common. "02af7391e7214ec3d2a634f490627cf4b9cff774" and "83e240ad70c6cffecc683c40931cc86e31f79c16" have entirely different histories.
02af7391e7
...
83e240ad70
|
@ -53,10 +53,7 @@ args = ["web-ext", "build", "--config=build/web-ext-${BROWSER}.json"]
|
||||||
[tasks.run]
|
[tasks.run]
|
||||||
clear = true
|
clear = true
|
||||||
command = "pnpm"
|
command = "pnpm"
|
||||||
# Set --target explicitly, since web-ext for some reason doesn't use the target
|
args = ["web-ext", "run", "--config=build/web-ext-${BROWSER}.json"]
|
||||||
# set in the configuration file. https://github.com/mozilla/web-ext/issues/1862
|
|
||||||
env = { TARGET = { source = "${BROWSER}", default_value = "${BROWSER}", mapping = { "firefox" = "firefox-desktop" } } }
|
|
||||||
args = ["web-ext", "run", "--target=${TARGET}", "--config=build/web-ext-${BROWSER}.json"]
|
|
||||||
|
|
||||||
# Alias for `WATCH=true makers build`.
|
# Alias for `WATCH=true makers build`.
|
||||||
[tasks.watch]
|
[tasks.watch]
|
||||||
|
|
|
@ -20,9 +20,3 @@
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tish-warning {
|
|
||||||
border: 1px solid var(--alert-color);
|
|
||||||
color: var(--alert-color);
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
|
@ -17,20 +17,12 @@ async function main(): Promise<void> {
|
||||||
const prefix = "tildes-shepherd-tour=";
|
const prefix = "tildes-shepherd-tour=";
|
||||||
const startsWithPrefix = anchor.startsWith(prefix);
|
const startsWithPrefix = anchor.startsWith(prefix);
|
||||||
|
|
||||||
// Get the tour ID from the anchor by removing the prefix.
|
|
||||||
const anchorTourId = anchor.slice(prefix.length);
|
|
||||||
|
|
||||||
// Automatically start the introduction tour if the person hasn't already
|
// Automatically start the introduction tour if the person hasn't already
|
||||||
// been through it and only when on the Tildes homepage.
|
// been through it and only when on the Tildes homepage.
|
||||||
if (!introductionUnderstood.value && window.location.pathname === "/") {
|
if (!introductionUnderstood.value && window.location.pathname === "/") {
|
||||||
// If a different tour is selected but the introduction hasn't happened yet,
|
// If a different tour is selected but the introduction hasn't happened yet,
|
||||||
// then the main function will be rerun once this tour finishes.
|
// then the main function will be rerun once this tour finishes.
|
||||||
startTour(
|
startTour("introduction", introductionSteps, [], startsWithPrefix);
|
||||||
"introduction",
|
|
||||||
introductionSteps,
|
|
||||||
[],
|
|
||||||
startsWithPrefix && anchorTourId !== "introduction",
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +30,9 @@ async function main(): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the tour ID from the anchor by removing the prefix.
|
||||||
|
const anchorTourId = anchor.slice(prefix.length);
|
||||||
|
|
||||||
// Then run through all of the tours we have and start the first match for the
|
// Then run through all of the tours we have and start the first match for the
|
||||||
// ID.
|
// ID.
|
||||||
for (const [id, steps, eventHandlers] of tourIdsAndSteps) {
|
for (const [id, steps, eventHandlers] of tourIdsAndSteps) {
|
||||||
|
|
|
@ -3,16 +3,8 @@
|
||||||
.tours {
|
.tours {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
grid-template-columns: repeat(var(--columns, 3), 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
|
||||||
@media (width <= 1200px) {
|
|
||||||
--columns: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (width <= 800px) {
|
|
||||||
--columns: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tour {
|
.tour {
|
||||||
|
@ -29,7 +21,7 @@
|
||||||
|
|
||||||
.tour-description,
|
.tour-description,
|
||||||
.tour-link {
|
.tour-link {
|
||||||
grid-column: span 2;
|
grid-column: 1 / 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,30 +6,8 @@ import {
|
||||||
renderInContainer,
|
renderInContainer,
|
||||||
} from "../utilities.js";
|
} from "../utilities.js";
|
||||||
|
|
||||||
const userIsLoggedIn =
|
|
||||||
document.querySelector(".logged-in-user-username") !== null;
|
|
||||||
|
|
||||||
const step01 = renderInContainer(
|
const step01 = renderInContainer(
|
||||||
<>
|
<>
|
||||||
{userIsLoggedIn ? (
|
|
||||||
""
|
|
||||||
) : (
|
|
||||||
<p class="tish-warning">
|
|
||||||
It looks like you aren't logged in to Tildes. Tildes Shepherd assumes
|
|
||||||
that you are logged in as a lot of the Tildes interface isn't shown to
|
|
||||||
logged out users.
|
|
||||||
<br />
|
|
||||||
To still let anyone without an account benefit from the extension you
|
|
||||||
may continue, however, know that certain parts of the tour <b>
|
|
||||||
will
|
|
||||||
</b>{" "}
|
|
||||||
break and look weird.
|
|
||||||
<br />
|
|
||||||
It's highly recommended that you exit the tour, log in and start it
|
|
||||||
again.
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<h1>The Homepage</h1>
|
<h1>The Homepage</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Reference in New Issue