diff --git a/deleteme.html b/deleteme.html
deleted file mode 100644
index d0963e2..0000000
--- a/deleteme.html
+++ /dev/null
@@ -1,15355 +0,0 @@
-
-
-
- Fundamentals of Electric Circuits - 9780078028229 - Exercise 3 | Quizlet
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
![logo]()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/slader-limit-bypass/js/quizlet_bypass.js b/slader-limit-bypass/js/quizlet_bypass.js
index 5f6a2dc..d1bbeab 100644
--- a/slader-limit-bypass/js/quizlet_bypass.js
+++ b/slader-limit-bypass/js/quizlet_bypass.js
@@ -34,8 +34,8 @@ function renderBypass()
{
if (window.location.toString().includes('quizlet.com/explanations/textbook-solutions'))
{
- // TODO: Redirect to old site
- expArea.innerHTML = `Textbooks currently only supported by Slader Bypass on the old website.
Click
here to be redirected to the working version of this question.
`;
+ var oldlink = getOldTextbookLink();
+ expArea.innerHTML = `Textbooks currently only supported by Slader Bypass on the old website.
Click
here to be redirected to the working version of this question. If that doesn't work, try finding it manually on the old site.
`;
}
else
{
@@ -44,7 +44,7 @@ function renderBypass()
}
}
- // TODO: Branch off to handle textbookExercisePageData. See line 1349 in "deleteme.html".
+ // TODO: Handle textbookExercisePageData.
// Parse JSON data
@@ -113,3 +113,15 @@ function httpGet(url)
req.send( null );
return req.responseText;
}
+
+
+function getOldTextbookLink(url)
+{
+ // This is mostly approximate.
+ const bookTitle = window.location.toString().match(/(?<=quizlet\.com\/explanations\/textbook-solutions\/).+?(?=-\d\d\d\d\d\d\d)/)[0];
+ const bookISBN = window.location.toString().split(bookTitle)[1].split('/')[0].replaceAll('-', '');
+ const page = document.getElementsByClassName('tsqwngb')[0].children[1].innerHTML.slice(5);
+ const problem = document.getElementsByClassName('t1aekklg')[0].innerHTML.slice(9);
+
+ return "https://www.slader.com/textbook/" + bookISBN + '-' + bookTitle + '/' + page + '/problems/' + problem;
+}
\ No newline at end of file