Skip to content

Commit

Permalink
Fix watch
Browse files Browse the repository at this point in the history
RoyalRoad
  • Loading branch information
OshekharO authored Oct 14, 2023
1 parent cf7766a commit 88d1f12
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions repo/royalroad.com.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==MiruExtension==
// @name RoyalRoad
// @version v0.0.1
// @version v0.0.2
// @author appdevelpo
// @lang en
// @license MIT
Expand Down Expand Up @@ -70,20 +70,23 @@ export default class Biquge extends Extension {
}

async watch(url) {
const res = await this.request(url);
const content = res.match(/<p>[^&]+?<\/p>/g);
const new_content = [];

const res = await this.request(url);
const content = res.match(/<p>[^&]+?<\/p>/g);
const new_content = [];
if (content) {
content.forEach((e) => {
e = e.replace(/<.+?>/g,"");
e = e.replace(/<.+?>/g, "");
console.log(e);
new_content.push(e)
})
const title = res.match(/>(.+?)<\/h1>/)[0]
return {
content:new_content,
title,
}
new_content.push(e);
});
}

const title = res.match(/>(.+?)<\/h1>/)[0];
return {
content: new_content,
title,
};
}

}

0 comments on commit 88d1f12

Please sign in to comment.