Skip to content

Commit

Permalink
update repository
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatFruedDued committed Jan 22, 2022
1 parent 7e8f00f commit 19d44d0
Show file tree
Hide file tree
Showing 41 changed files with 749 additions and 20 deletions.
1 change: 0 additions & 1 deletion beta/ploader/.gitignore

This file was deleted.

12 changes: 12 additions & 0 deletions legacy/cloader/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: okr765
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions release/ploader/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
*.tar.gz
2 changes: 2 additions & 0 deletions release/ploader/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
*.tar.gz
15 changes: 15 additions & 0 deletions release/ploader/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:17-alpine

WORKDIR /app

COPY package.json ./

RUN npm install

COPY . .

ENV PORT=8080

EXPOSE 8080

CMD [ "npm", "start" ]
674 changes: 674 additions & 0 deletions release/ploader/LICENSE

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ class App extends React.Component {

confirmRemoveInjectable() {
this.setState({ removeDialogOpen: false });
blooketUtility.injectables.splice(
blooketUtility.injectables.indexOf(this.state.injectableToRemove),
1
);
for (const [i, injectable] of Object.entries(blooketUtility.injectables)) {
if (this.state.injectableToRemove.url === injectable.url) {
blooketUtility.injectables.splice(i, 1);
}
}
if (this.state.injectableToRemove.cleanupScript) {
const scriptElement = document.createElement("script");
scriptElement.src = this.state.injectableToRemove.cleanupScript;
Expand Down Expand Up @@ -372,7 +373,7 @@ class NumberPref extends React.Component {

handleInputChange(e) {
try {
if(!isNaN(parseFloat(e.target.value))) {
if (!isNaN(parseFloat(e.target.value))) {
this.props.pref.value = parseFloat(e.target.value);
this.forceUpdate();
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -49,33 +49,57 @@
blooketUtility.cookie = this.getResponseHeader("bu-set-cookie");
}
});
this._send(...arguments);
return this._send(...arguments);
};

Object.defineProperty(Object.prototype, "baseURL", {
get: function () {
return (
XMLHttpRequest.prototype._open = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function () {
if (
["https://api.blooket.com/", "https://www.googleapis.com/"].some((e) =>
arguments[1].startsWith(e)
)
)
arguments[1] =
(blooketUtility.corsProxyUrl ||
"https://blooket-utility-cors.herokuapp.com/") +
"https://api.blooket.com"
);
},
set: function () {
return;
},
});
"https://blooket-utility-cors.okr765.com/") + arguments[1];
return this._open(...arguments);
};

setInterval(async () => {
for (const img of Object.values(document.getElementsByTagName("img"))) {
if (img.src?.startsWith("/") && !img.stop) {
img.stop = true;
img.src = URL.createObjectURL(
new Blob([
await (
await fetch(
(blooketUtility.corsProxyUrl ||
"https://blooket-utility-cors.okr765.com/") +
"https://www.blooket.com" +
img.src
)
).arrayBuffer(),
])
);
}
if (img.src?.startsWith("https://www.blooket.com") && !img.stop)
img.src =
(blooketUtility.corsProxyUrl ||
"https://blooket-utility-cors.okr765.com/") + img.src;
}
}, 10);

Object.defineProperty(HTMLImageElement.prototype, "src", {
get: function () {
return this._src;
return this.getAttribute("src");
},
set: function (d) {
this._src = d;
if (d.startsWith("/")) {
this.setAttribute(
"src",
(blooketUtility.corsProxyUrl ||
"https://blooket-utility-cors.herokuapp.com/") +
"https://blooket-utility-cors.okr765.com/") +
"https://www.blooket.com" +
d
);
Expand Down
File renamed without changes.

0 comments on commit 19d44d0

Please sign in to comment.