mirror of
https://github.com/lebr0nli/slader-extension.git
synced 2025-05-10 18:42:17 +00:00
Work on terms instead of specific divs
This commit is contained in:
parent
baa64c93c3
commit
0691101b9f
|
@ -1 +0,0 @@
|
||||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={974:function(t){t.exports=e}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var a={};return function(){n.d(a,{default:function(){return s}});var e=n(974),t=n.n(e),r=function(e,t,r){for(var n=r,a=0,i=e.length;n<t.length;){var o=t[n];if(a<=0&&t.slice(n,n+i)===e)return n;"\\"===o?n++:"{"===o?a++:"}"===o&&a--,n++}return-1},i=/^\\begin{/,o=function(e,t){for(var n,a=[],o=new RegExp("("+t.map((function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")})).join("|")+")");-1!==(n=e.search(o));){n>0&&(a.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var l=t.findIndex((function(t){return e.startsWith(t.left)}));if(-1===(n=r(t[l].right,e,t[l].left.length)))break;var d=e.slice(0,n+t[l].right.length),s=i.test(d)?d:e.slice(t[l].left.length,n);a.push({type:"math",data:s,rawData:d,display:t[l].display}),e=e.slice(n+t[l].right.length)}return""!==e&&a.push({type:"text",data:e}),a},l=function(e,r){var n=o(e,r.delimiters);if(1===n.length&&"text"===n[0].type)return null;for(var a=document.createDocumentFragment(),i=0;i<n.length;i++)if("text"===n[i].type)a.appendChild(document.createTextNode(n[i].data));else{var l=document.createElement("span"),d=n[i].data;r.displayMode=n[i].display;try{r.preProcess&&(d=r.preProcess(d)),t().render(d,l,r)}catch(e){if(!(e instanceof t().ParseError))throw e;r.errorCallback("KaTeX auto-render: Failed to parse `"+n[i].data+"` with ",e),a.appendChild(document.createTextNode(n[i].rawData));continue}a.appendChild(l)}return a},d=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var a=t.childNodes[n];if(3===a.nodeType){var i=l(a.textContent,r);i&&(n+=i.childNodes.length-1,t.replaceChild(i,a))}else 1===a.nodeType&&function(){var t=" "+a.className+" ";-1===r.ignoredTags.indexOf(a.nodeName.toLowerCase())&&r.ignoredClasses.every((function(e){return-1===t.indexOf(" "+e+" ")}))&&e(a,r)}()}},s=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},d(e,r)}}(),a=a.default}()}));
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,6 @@
|
||||||
// Remove 'x' free solutions badge.
|
// Remove 'x' free solutions badge and "verify your email" badge.
|
||||||
if (document.querySelector('.b1if8dab')) { document.querySelector('.b1if8dab').style.display = "none"; }
|
if (document.querySelector('.BannerWrapper')) { document.querySelector('.BannerWrapper').style.display = "none"; }
|
||||||
|
if (document.querySelector('.UINotification')) { document.querySelector('.UINotification').style.display = "none"; }
|
||||||
|
|
||||||
checkIfNewAccountNeeded();
|
checkIfNewAccountNeeded();
|
||||||
|
|
||||||
|
@ -8,17 +9,17 @@ function checkIfNewAccountNeeded()
|
||||||
// Three cases: Almost out of solutions, not logged in at all, or out of solutions.
|
// Three cases: Almost out of solutions, not logged in at all, or out of solutions.
|
||||||
|
|
||||||
// Almost out of solutions
|
// Almost out of solutions
|
||||||
if (document.querySelector('.b1m16m5o') && document.querySelector('.b1m16m5o').textContent == "This is your last free explanation")
|
if (pageContains("This is your last free explanation"))
|
||||||
{
|
{
|
||||||
signUpNewAccount(false);
|
signUpNewAccount(false);
|
||||||
}
|
}
|
||||||
// Not logged in
|
// Not logged in
|
||||||
else if (document.querySelector('.t1qexa4p') && document.querySelector('.t1qexa4p').textContent == "Create a free account to see explanations")
|
else if (pageContains("Create a free account to see explanations"))
|
||||||
{
|
{
|
||||||
signUpNewAccount(true);
|
signUpNewAccount(true);
|
||||||
}
|
}
|
||||||
// Out of solutions
|
// Out of solutions
|
||||||
else if (document.querySelector('.sukvi6d') && document.querySelector('.sukvi6d').textContent == "YOU'VE REACHED YOUR FREE LIMIT")
|
else if (pageContains("YOU'VE REACHED YOUR FREE LIMIT"))
|
||||||
{
|
{
|
||||||
signUpNewAccount(true);
|
signUpNewAccount(true);
|
||||||
}
|
}
|
||||||
|
@ -27,10 +28,7 @@ function checkIfNewAccountNeeded()
|
||||||
function signUpNewAccount(doesReload)
|
function signUpNewAccount(doesReload)
|
||||||
{
|
{
|
||||||
// We're just gonna assume this is a large enough characterspace for it to never matter.
|
// We're just gonna assume this is a large enough characterspace for it to never matter.
|
||||||
var email = "sq_bypass_" + randomString(10, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
|
var name = "sq_bypass_" + randomString(10, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
|
||||||
|
|
||||||
// Same thing ^
|
|
||||||
var username = "sq_bypass_" + randomString(10, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
|
|
||||||
|
|
||||||
var request = fetch("https://quizlet.com/webapi/3.2/direct-signup", {
|
var request = fetch("https://quizlet.com/webapi/3.2/direct-signup", {
|
||||||
"headers": {
|
"headers": {
|
||||||
|
@ -47,7 +45,7 @@ function signUpNewAccount(doesReload)
|
||||||
},
|
},
|
||||||
"referrer": "https://quizlet.com/goodbye",
|
"referrer": "https://quizlet.com/goodbye",
|
||||||
"referrerPolicy": "origin-when-cross-origin",
|
"referrerPolicy": "origin-when-cross-origin",
|
||||||
"body": "{\"TOS\":false,\"birth_day\":\"5\",\"birth_month\":\"5\",\"birth_year\":\"2000\",\"email\":\"" + email + "@example.com\",\"is_free_teacher\":\"2\",\"is_parent\":false,\"password1\":\"SladerBypassPassword\",\"redir\":\"https://quizlet.com/goodbye\",\"signupOrigin\":\"global-header-link\",\"screenName\":\"Logout/logoutMobileSplash\",\"username\":\"" + username + "\",\"marketing_opt_out\":false}",
|
"body": "{\"TOS\":false,\"birth_day\":\"5\",\"birth_month\":\"5\",\"birth_year\":\"2000\",\"email\":\"" + name + "@example.com\",\"is_free_teacher\":\"2\",\"is_parent\":false,\"password1\":\"SladerBypassPassword\",\"redir\":\"https://quizlet.com/goodbye\",\"signupOrigin\":\"global-header-link\",\"screenName\":\"Logout/logoutMobileSplash\",\"username\":\"" + name + "\",\"marketing_opt_out\":false}",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"mode": "cors",
|
"mode": "cors",
|
||||||
"credentials": "include"
|
"credentials": "include"
|
||||||
|
@ -71,3 +69,15 @@ function getToken(){
|
||||||
token = document.cookie.match("(?:^|;)\\s*" + "qtkn".replace(/[\-\[\]{}()*+?.,\\^$|#\s]/g, "$&") + "=([^;]*)");
|
token = document.cookie.match("(?:^|;)\\s*" + "qtkn".replace(/[\-\[\]{}()*+?.,\\^$|#\s]/g, "$&") + "=([^;]*)");
|
||||||
return decodeURIComponent(token[1]);
|
return decodeURIComponent(token[1]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function pageContains(str)
|
||||||
|
{
|
||||||
|
if (document.body.innerHTML.match(str))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "slader bypass",
|
"name": "slader bypass",
|
||||||
"version": "0.8",
|
"version": "0.9",
|
||||||
"author":"Alan Li & Ethan Harvey",
|
"author":"Alan Li & Ethan Harvey",
|
||||||
"description": "Slader/Quizlet 5 solutions limit bypass",
|
"description": "Slader/Quizlet 5 solutions limit bypass",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matches": ["*://quizlet.com/explanations/questions/*", "*://quizlet.com/explanations/textbook-solutions/*/*"],
|
"matches": ["*://quizlet.com/explanations/questions/*", "*://quizlet.com/explanations/textbook-solutions/*/*"],
|
||||||
"js": ["js/katex/katex.js", "js/katex/autorender.js", "js/quizlet_bypass.js"]
|
"js": ["js/quizlet_bypass.js"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"manifest_version": 2
|
"manifest_version": 2
|
||||||
|
|
Binary file not shown.
BIN
slader_bypass-0.9-fx.xpi
Normal file
BIN
slader_bypass-0.9-fx.xpi
Normal file
Binary file not shown.
Loading…
Reference in a new issue