Skip to content

Commit

Permalink
fix the unpkg-cdn option (#447)
Browse files Browse the repository at this point in the history
* Update sitemap-automation.yml

Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>

* Update sitemap-automation.yml

Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>

* Update sitemap-automation.yml

Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>

* Update Update.json

Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>

* fix unpkg cdn option

* 1.1.43

* Update version info to 1.1.43

---------

Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
Co-authored-by: Shan Wenxiao <seanoj_noreply@yeah.net>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 12, 2024
1 parent 7375d38 commit aaec780
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
42 changes: 17 additions & 25 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,17 @@
}
],
"Notes": "Popper.js is so stupid..."
},
"1.1.43": {
"UpdateDate": 1707715028113,
"Prerelease": true,
"UpdateContents": [
{
"PR": 447,
"Description": "fix the unpkg-cdn option"
}
],
"Notes": "No release notes were provided for this release."
}
}
}
7 changes: 4 additions & 3 deletions XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 1.1.42
// @version 1.1.43
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
Expand Down Expand Up @@ -402,6 +402,7 @@ let ServerURL = (UtilityEnabled("DebugMode") ? "https://ghpages.xmoj-bbs.tech/"
let CurrentUsername = document.querySelector("#profile").innerText;
CurrentUsername = CurrentUsername.replaceAll(/[^a-zA-Z0-9]/g, "");
let IsAdmin = AdminUserList.indexOf(CurrentUsername) !== -1;

async function main() {
if (location.href.startsWith('http://')) {
//use https
Expand Down Expand Up @@ -515,8 +516,8 @@ async function main() {
}
];
if (UtilityEnabled("UnpkgCdn")) {
resources[0].src = 'https://unpkg.com/@popperjs/core@2.11.8/dist/umd/popper.min.js';
resources[4].href = 'https://unpkg.com/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css';
resources[3].href = 'https://unpkg.com/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css';
resources[4].src = 'https://unpkg.com/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js';
}
let loadResources = async () => {
let promises = resources.map(resource => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
"version": "1.1.42",
"version": "1.1.43",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
Expand Down

0 comments on commit aaec780

Please sign in to comment.