mirror of
https://github.com/lebr0nli/slader-extension.git
synced 2025-05-10 20:42:16 +00:00
Remove unneeded function
This commit is contained in:
parent
ffa5bec75b
commit
1f8f35944a
|
@ -143,15 +143,3 @@ async function doFetch(url)
|
||||||
});
|
});
|
||||||
return response.text();
|
return response.text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
Loading…
Reference in a new issue