Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] fix tests and a bug with walkthrough editing dark mode #11

Merged
merged 1 commit into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 4 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Userscript Files
dist
coverage
node_modules
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.1
- Fixed test runner not reporting correctly
- Fixed a bug with improved image loader not working if there was alot of images

## 2.0.0
- Moved from browserify to webpack, considered breaking as its a change to how the script is compiled.

Expand Down
4 changes: 2 additions & 2 deletions dist/trueachievements-extras.min.user.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions dist/trueachievements-extras.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name TrueAchievements Extra
// @namespace dynamite-andy
// @version 2.0.0
// @version 2.0.1
// @iconURL https://github.com/andrewcartwright1/trueachievements-extra/blob/main/src/resources/icons/favicon32x32.ico?raw=true
// @icon64URL https://github.com/andrewcartwright1/trueachievements-extra/blob/main/src/resources/icons/favicon64x64.ico?raw=true
// @updateURL https://github.com/andrewcartwright1/trueachievements-extra/raw/main/dist/trueachievements-extras.user.js
Expand Down Expand Up @@ -1582,7 +1582,7 @@ var skin_update = injectStylesIntoStyleTag_default()(skin/* default */.Z, skin_o

const staff_walkthrough_improvements_listen = async () => {
const iframe = await waitForElement('#txtWalkthrough_ifr');
const globalThemeElement = await waitForElement('[data-theme]');
const globalThemeElement = await waitForElement('.page, [data-theme]');
const tinymceThemeElement = await waitForElement(`.${Constants.Styles.StaffWalkthroughImprovements.EditWalkthroughPage.themeToggleJs}`);
let theme;
if (config.staffWalkthroughImprovements.tinymceTheme === null) {
Expand Down Expand Up @@ -1659,7 +1659,7 @@ const staff_walkthrough_improvements_listen = async () => {


const edit_walkthrough_applyBody = async () => {
await allConcurrently(2, [staff_walkthrough_improvements, applyImprovedImageSelector, applyTinymceThemeToggle]);
await allConcurrently(2, [applyImprovedImageSelector, applyTinymceThemeToggle, staff_walkthrough_improvements]);
};
const applyImprovedImageSelector = async () => {
if (!config.staffWalkthroughImprovements.improvedImageSelector)
Expand All @@ -1669,9 +1669,10 @@ const applyImprovedImageSelector = async () => {
const imageContainer = await waitForElement('#oWalkthroughImageViewer');
imageContainer.classList.add(Constants.Styles.StaffWalkthroughImprovements.EditWalkthroughPage.improvedImageSelectorStyle, Constants.Styles.StaffWalkthroughImprovements.EditWalkthroughPage.improvedImageSelectorJs);
const imageViewer = imageContainer.querySelector('.imageviewer');
const imageLink = await waitForElement('.addimages a', imageContainer);
imageContainer.insertBefore(stickyImageHeader, imageViewer);
stickyImageHeader.appendChild(imageViewer.querySelector('.itemname, .noimages'));
stickyImageHeader.appendChild(imageViewer.querySelector('.addimages a'));
stickyImageHeader.appendChild(imageLink);
[...imageViewer.querySelectorAll('.ivimage a')].forEach(imageAnchor => {
const clonedImageTitle = parsedDocument.querySelector(`.${Constants.Styles.StaffWalkthroughImprovements.EditWalkthroughPage.improvedImageSelectorImageTitleJs}`).cloneNode(true);
const imageTitle = template(clonedImageTitle, { image: imageAnchor.querySelector('img') });
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.