Comments (6)
``{
"guid": "03f193cd-ab75-43f7-a2b7-6c74e133f6ba",
"rule_name": "test",
"url_regex": "?:https://)*(?:www\\.)novelmax\\.net/n/.",
"pagetype_code": " const urlPattern = /^https:\/\/novelmax\.net\/n\/florida-mans-general-store-in-cultivation-world/i;\n\n // Check if the current page is supported by the rule\n if (window.location.href.match(urlPattern)) {\n // Check for captcha pages\n if ($('.captcha-page').length > 0) {\n // Check if it's an Auto-Captcha page\n if ($('.auto-redirect-captcha').length > 0) {\n // Auto-Redirect, no user intervention needed\n return -1;\n } else {\n // Manual-Captcha, user might need to use the renderer\n return -2;\n }\n } else {\n // Page is supported, return 0\n return 0;\n }\n } else {\n // Page not supported by the rule\n return -3;\n }\n}\n",
"toc_code": "let retMe = {\n 'CoverURL':
'),\n 'ChapterCount': 0,\n 'ChapterURLs': [],\n};\n\nawait sleep(100);\n\n// Extract all chapter URLs\nlet chapterURLs = [];\n$(".list-chapter li a").each(function () {\n let chapterUrl = $(this).attr("href");\n chapterURLs.push(chapterUrl);\n});\n\nretMe.ChapterURLs = chapterURLs.reverse();\nretMe.ChapterCount = retMe.ChapterURLs.length;\n\nreturn retMe;",
"chapter_code": "injectJquery();\n\nlet visitedChapterURLs = new Set();\n\nlet retMe;\n\nif (isTOCPage()) {\n throw new Error("Error: Script is on the Table of Contents page. Not a chapter page.");\n} else {\n let currentChapterURL = window.location.href;\n\n if (visitedChapterURLs.has(currentChapterURL)) {\n throw new Error("Error: Same chapter URL loaded twice. Breaking the script.");\n }\n\n visitedChapterURLs.add(currentChapterURL);\n\n // Check if the next chapter button is disabled\n let nextChapterButton =
"url_blocks": "pubfuture-ad.com"
},
from fanfiction-manager.
Added the rule into a txt since github doesnt like the raw paste
from fanfiction-manager.
Solved the issues with the regex but still not working correct
(?:https?://)(?:www\.)?novelmax\.net/.
Rule applied -> novelmax
Downloading Novel Metadata...
Error -> [SCRIPT] Script failed to execute, this normally means an error was thrown. Check the renderer console for the error.
from fanfiction-manager.
Solved the issue, put the solution below for others
{
"guid": "03f193cd-ab75-43f7-a2b7-6c74e133f6ba",
"rule_name": "novelmax",
"url_regex": "(?:https://)*(?:www\.)novelmax.net/.",
"pagetype_code": "injectJquery();\n\nreturn 0;",
"toc_code": "// Click on the tab to load chapters\n$('a[href="#tab-chapters"]').click();\n\n// Wait for the tab to be fully expanded\nawait new Promise(resolve => {\n let checkInterval = setInterval(() => {\n if (
'),\n 'ChapterCount': chapterURLs.length,\n 'ChapterURLs': chapterURLs,\n};\n\nreturn retMe;\n",
"chapter_code": "injectJquery();\n\nlet visitedChapterURLs = new Set();\n\nlet retMe;\n\nif (isTOCPage()) {\n throw new Error("Error: Script is on the Table of Contents page. Not a chapter page.");\n} else {\n let currentChapterURL = window.location.href;\n\n if (visitedChapterURLs.has(currentChapterURL)) {\n throw new Error("Error: Same chapter URL loaded twice. Breaking the script.");\n }\n\n visitedChapterURLs.add(currentChapterURL);\n\n // Check if the next chapter button is disabled\n let nextChapterButton =
"url_blocks": "pubfuture-ad.com"
},
from fanfiction-manager.
solved put in txt.
Remove the <
at the start and end of it, was a failed copy and paste attempt into github as a quote
rule.txt
from fanfiction-manager.
Thanks for the rule. Will add to rule-list
Just wanted to mention:
1- The Page Type
script runs whenever any URL is loaded, there is no need to put duplicate injectJquery()
entries in the following scripts. NOTE : This behavior changes on Tester
tab, if the retry
feature is used.
2- In Ch-Script
, nextURL
is an optional field, only to be used if chapter list cannot be determined(for any reason) while getting the TOC data. Other than going for retries, I haven't found any use case for this yet, but still added it on a whim at the time I started developing the app
from fanfiction-manager.
Related Issues (20)
- Status
- No Cover Art - Fanfiction.net HOT 4
- Novel update related buttons stuck HOT 1
- Allow Renderer interaction while loading HOT 3
- EPUB Export HOT 2
- Display Story Status - Ongoing/Completed HOT 1
- Retain Website Specific Styles
- Feature to download in-chapter images
- Display More Novel-Metadata HOT 1
- Please add booktoki157.com HOT 2
- Slow Download Mode HOT 1
- [UpdateDownloadAll] Race Condition HOT 2
- Not able to run the code. HOT 1
- Royalroad.com rule issue. HOT 2
- Webnovel.com not working?? HOT 3
- UpdateDownloadAll, and sometimes normal update on single novel has issues with getting chapter list HOT 3
- Rule contribution (lightnovelworld | Slow update to avoid ban) HOT 5
- Does not work on linux/crostini/archlinux. HOT 5
- The "novelmax | binnovel" TOC script doesn't work. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fanfiction-manager.