Duolingo Pro BETA

Duolingo Auto Solver Tool - WORKING AUGUST 2023

目前为 2023-09-20 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Duolingo Pro BETA
  3. // @namespace Violentmonkey Scripts
  4. // @version 2.0BETA6
  5. // @description Duolingo Auto Solver Tool - WORKING AUGUST 2023
  6. // @author anonymoushackerIV
  7. // @match https://*.duolingo.com/*
  8. // @grant none
  9. // @license MIT
  10. // @require https://unpkg.com/@supabase/supabase-js@2.12.1
  11. // ==/UserScript==
  12.  
  13. let solvingIntervalId;
  14. let isAutoMode = false;
  15. let isSolving = false;
  16. let isTokenRunning = false;
  17.  
  18. const debug = false;
  19.  
  20. let simulated;
  21. if (JSON.parse(localStorage.getItem('DuolingoProSettingsHumaneSolvingMode')) === null) {
  22. simulated = false;
  23. } else {
  24. simulated = JSON.parse(localStorage.getItem('DuolingoProSettingsHumaneSolvingMode'));
  25. }
  26.  
  27. let isSendFeedbackButtonPressed = false;
  28.  
  29. let autoSolverBoxRepeatAmount = 0;
  30. autoSolverBoxRepeatAmount = Number(sessionStorage.getItem('autoSolverBoxRepeatAmount'));
  31.  
  32. let ProBlockBannerOneVisible = true;
  33. if (JSON.parse(localStorage.getItem('ProBlockBannerOneVisible')) === null) {
  34. ProBlockBannerOneVisible = true;
  35. } else {
  36. ProBlockBannerOneVisible = JSON.parse(localStorage.getItem('ProBlockBannerOneVisible'));
  37. }
  38.  
  39.  
  40. let autoSolverBoxPracticeOnlyMode;
  41. let autoSolverBoxRepeatLessonMode;
  42. if (JSON.parse(sessionStorage.getItem('autoSolverBoxPracticeOnlyMode')) === null) {
  43. autoSolverBoxPracticeOnlyMode = true;
  44. } else {
  45. autoSolverBoxPracticeOnlyMode = JSON.parse(sessionStorage.getItem('autoSolverBoxPracticeOnlyMode'));
  46. }
  47. if (JSON.parse(sessionStorage.getItem('autoSolverBoxRepeatLessonMode')) === null) {
  48. autoSolverBoxRepeatLessonMode = false;
  49. } else {
  50. autoSolverBoxRepeatLessonMode = JSON.parse(sessionStorage.getItem('autoSolverBoxRepeatLessonMode'));
  51. }
  52.  
  53.  
  54. let wasAutoSolverBoxRepeatStartButtonPressed = false;
  55. if (JSON.parse(sessionStorage.getItem('wasAutoSolverBoxRepeatStartButtonPressed')) === null) {
  56. wasAutoSolverBoxRepeatStartButtonPressed = false;
  57. } else {
  58. wasAutoSolverBoxRepeatStartButtonPressed = JSON.parse(sessionStorage.getItem('wasAutoSolverBoxRepeatStartButtonPressed'));
  59. }
  60.  
  61. // Whats New Variables Start
  62. let wasWhatsNewInTwoPointZeroBetaThreeFinished = false;
  63. if (JSON.parse(localStorage.getItem('wasWhatsNewInTwoPointZeroBetaThreeFinished')) === null) {
  64. wasWhatsNewInTwoPointZeroBetaThreeFinished = false;
  65. } else {
  66. wasWhatsNewInTwoPointZeroBetaThreeFinished = JSON.parse(localStorage.getItem('wasWhatsNewInTwoPointZeroBetaThreeFinished'));
  67. }
  68.  
  69. let wasWhatsNewInTwoPointZeroBetaFourFinished = false;
  70. if (JSON.parse(localStorage.getItem('wasWhatsNewInTwoPointZeroBetaFourFinished')) === null) {
  71. wasWhatsNewInTwoPointZeroBetaFourFinished = false;
  72. } else {
  73. wasWhatsNewInTwoPointZeroBetaFourFinished = JSON.parse(localStorage.getItem('wasWhatsNewInTwoPointZeroBetaFourFinished'));
  74. }
  75.  
  76. let wasWhatsNewInTwoPointZeroBetaSixFinished = false;
  77. if (JSON.parse(localStorage.getItem('wasWhatsNewInTwoPointZeroBetaSixFinished')) === null) {
  78. wasWhatsNewInTwoPointZeroBetaSixFinished = false;
  79. } else {
  80. wasWhatsNewInTwoPointZeroBetaSixFinished = JSON.parse(localStorage.getItem('wasWhatsNewInTwoPointZeroBetaSixFinished'));
  81. }
  82.  
  83. let whatsNewInBetaStage = 1;
  84. // Whats New Variables End
  85.  
  86. let wasDuolingoProSettingsButtonOnePressed = false;
  87.  
  88. // Duolingo Pro Settings Variables Start
  89.  
  90. //moved here
  91. let AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox = false;
  92. //moved here
  93.  
  94. let AutoSolverSettingsShowAutoSolverBox = true;
  95. if (JSON.parse(localStorage.getItem('AutoSolverSettingsShowAutoSolverBox')) === null) {
  96. AutoSolverSettingsShowAutoSolverBox = true; // default
  97. } else if (JSON.parse(localStorage.getItem('AutoSolverSettingsShowAutoSolverBox')) === false) {
  98. AutoSolverSettingsShowAutoSolverBox = JSON.parse(localStorage.getItem('AutoSolverSettingsShowAutoSolverBox'));
  99.  
  100. AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox = false;
  101. localStorage.setItem('AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox', AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox);
  102.  
  103. } else {
  104. AutoSolverSettingsShowAutoSolverBox = JSON.parse(localStorage.getItem('AutoSolverSettingsShowAutoSolverBox'));
  105. }
  106.  
  107. //was here
  108. if (JSON.parse(localStorage.getItem('AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox')) === null) {
  109. AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox = false; // default
  110. } else {
  111. AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox = JSON.parse(localStorage.getItem('AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox'));
  112. }
  113.  
  114. let AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox = true;
  115. if (JSON.parse(localStorage.getItem('AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox')) === null) {
  116. AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox = true; // default
  117. } else {
  118. AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox = JSON.parse(localStorage.getItem('AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox'));
  119. }
  120.  
  121. let AutoSolverSettingsLowPerformanceMode = false;
  122. if (JSON.parse(localStorage.getItem('AutoSolverSettingsLowPerformanceMode')) === null) {
  123. AutoSolverSettingsLowPerformanceMode = false; // default
  124. } else {
  125. AutoSolverSettingsLowPerformanceMode = JSON.parse(localStorage.getItem('AutoSolverSettingsLowPerformanceMode'));
  126. }
  127.  
  128. let DuolingoProSettingsProBlockMode = true;
  129. if (JSON.parse(localStorage.getItem('DuolingoProSettingsProBlockMode')) === null) {
  130. DuolingoProSettingsProBlockMode = true; // default
  131. } else {
  132. DuolingoProSettingsProBlockMode = JSON.parse(localStorage.getItem('DuolingoProSettingsProBlockMode'));
  133. if (!DuolingoProSettingsProBlockMode) {
  134. ProBlockBannerOneVisible = true;
  135. localStorage.setItem('ProBlockBannerOneVisible', ProBlockBannerOneVisible);
  136. }
  137. }
  138.  
  139. let DuolingoProSettingsTurboSolveMode = false;
  140. if (JSON.parse(localStorage.getItem('DuolingoProSettingsTurboSolveMode')) === null) {
  141. DuolingoProSettingsTurboSolveMode = false; // default
  142. } else {
  143. DuolingoProSettingsTurboSolveMode = JSON.parse(localStorage.getItem('DuolingoProSettingsTurboSolveMode'));
  144. }
  145.  
  146. let DuolingoProSettingsHumaneSolvingMode = false;
  147. if (JSON.parse(localStorage.getItem('DuolingoProSettingsHumaneSolvingMode')) === null) {
  148. DuolingoProSettingsHumaneSolvingMode = false; // default
  149. } else {
  150. DuolingoProSettingsHumaneSolvingMode = JSON.parse(localStorage.getItem('DuolingoProSettingsHumaneSolvingMode'));
  151. }
  152. // Duolingo Pro Settings Variables End
  153.  
  154.  
  155. function addButtons() {
  156. if (window.location.pathname === '/learn') {
  157. let button = document.querySelector('a[data-test="global-practice"]');
  158. if (button) {
  159. return;
  160. }
  161. }
  162.  
  163. const solveAllButton = document.getElementById("solveAllButton");
  164. if (solveAllButton !== null) {
  165. return;
  166. }
  167.  
  168. const original = document.querySelectorAll('[data-test="player-next"]')[0];
  169.  
  170. const storiesContinue = document.querySelectorAll('[data-test="stories-player-continue"]')[0];
  171.  
  172. if (original === undefined) {
  173.  
  174. if (storiesContinue === undefined) {
  175. const startButton = document.querySelector('[data-test="start-button"]');
  176. console.log(`Wrapper line: ${startButton}`);
  177. if (startButton === null) {
  178. return;
  179. }
  180. const wrapper = startButton.parentNode;
  181. const solveAllButton = document.createElement('a');
  182. solveAllButton.className = startButton.className;
  183. solveAllButton.id = "solveAllButton";
  184. solveAllButton.innerText = "COMPLETE SKILL";
  185. solveAllButton.removeAttribute('href');
  186. solveAllButton.addEventListener('click', () => {
  187. solving();
  188. setInterval(() => {
  189. const startButton = document.querySelector('[data-test="start-button"]');
  190. if (startButton && startButton.innerText.startsWith("START")) {
  191. startButton.click();
  192. }
  193. }, 1000);
  194. startButton.click();
  195. });
  196. wrapper.appendChild(solveAllButton);
  197. } else {
  198. // const wrapper = document.getElementsByClassName('_10vOG')[0];
  199. const wrapper = document.querySelector('._10vOG, ._2L_r0');
  200. wrapper.style.display = "flex";
  201.  
  202. //
  203.  
  204. const solveCopy = document.createElement('button');
  205.  
  206. const presssolveCopy1 = () => {
  207. solveCopy.style.borderBottom = '0px';
  208. solveCopy.style.marginBottom = '4px';
  209. solveCopy.style.top = '4px';
  210. };
  211.  
  212. // Function to revert the border-bottom when the button is released
  213. const releasesolveCopy1 = () => {
  214. solveCopy.style.borderBottom = '4px solid #2b70c9';
  215. solveCopy.style.marginBottom = '0px';
  216. solveCopy.style.top = '0px';
  217. };
  218.  
  219. // Add event listeners for mousedown, mouseup, and mouseleave
  220. solveCopy.addEventListener('mousedown', presssolveCopy1);
  221. solveCopy.addEventListener('mouseup', releasesolveCopy1);
  222. solveCopy.addEventListener('mouseleave', releasesolveCopy1);
  223.  
  224.  
  225. const pauseCopy = document.createElement('button');
  226.  
  227. const presspauseCopy2 = () => {
  228. pauseCopy.style.borderBottom = '0px';
  229. pauseCopy.style.marginBottom = '4px';
  230. pauseCopy.style.top = '4px';
  231. };
  232.  
  233. // Function to revert the border-bottom when the button is released
  234. const releasepauseCopy2 = () => {
  235. pauseCopy.style.borderBottom = '4px solid #ff9600';
  236. pauseCopy.style.marginBottom = '0px';
  237. pauseCopy.style.top = '0px';
  238. };
  239.  
  240. // Add event listeners for mousedown, mouseup, and mouseleave
  241. pauseCopy.addEventListener('mousedown', presspauseCopy2);
  242. pauseCopy.addEventListener('mouseup', releasepauseCopy2);
  243. pauseCopy.addEventListener('mouseleave', releasepauseCopy2);
  244.  
  245.  
  246. solveCopy.id = 'solveAllButton';
  247. solveCopy.innerHTML = solvingIntervalId ? 'PAUSE SOLVE' : 'SOLVE ALL';
  248. solveCopy.disabled = false;
  249. pauseCopy.innerHTML = 'SOLVE';
  250.  
  251. const solveCopyStyle = `
  252. position: relative;
  253. min-width: 150px;
  254. font-size: 17px;
  255. border: none;
  256. border-bottom: 4px solid #2b70c9;
  257. border-radius: 16px;
  258. padding: 13px 16px;
  259. transform: translateZ(0);
  260. transition: filter .0s;
  261. font-weight: 700;
  262. letter-spacing: .8px;
  263. background: #1cb0f6;
  264. color: rgb(var(--color-snow));
  265. margin-left: 20px;
  266. cursor: pointer;
  267. `;
  268.  
  269. const pauseCopyStyle = `
  270. position: relative;
  271. min-width: 100px;
  272. font-size: 17px;
  273. border: none;
  274. border-bottom: 4px solid #ff9600;
  275. border-radius: 16px;
  276. padding: 13px 16px;
  277. transform: translateZ(0);
  278. transition: filter .0s;
  279. font-weight: 700;
  280. letter-spacing: .8px;
  281. background: #ffc800;
  282. color: rgb(var(--color-snow));
  283. margin-left: 20px;
  284. cursor: pointer;
  285. `;
  286.  
  287. solveCopy.style.cssText = solveCopyStyle;
  288. pauseCopy.style.cssText = pauseCopyStyle;
  289.  
  290. [solveCopy, pauseCopy].forEach(button => {
  291. button.addEventListener("mousemove", () => {
  292. button.style.filter = "brightness(1.1)";
  293. });
  294. });
  295.  
  296. [solveCopy, pauseCopy].forEach(button => {
  297. button.addEventListener("mouseleave", () => {
  298. button.style.filter = "none";
  299. });
  300. });
  301.  
  302. storiesContinue.parentElement.appendChild(pauseCopy);
  303. storiesContinue.parentElement.appendChild(solveCopy);
  304.  
  305. solveCopy.addEventListener('click', solving);
  306. pauseCopy.addEventListener('click', solve);
  307.  
  308. //solving();
  309. }
  310. } else {
  311. // const wrapper = document.getElementsByClassName('_10vOG')[0];
  312. const wrapper = document.querySelector('._10vOG, ._2L_r0');
  313. wrapper.style.display = "flex";
  314.  
  315. //
  316.  
  317. const solveCopy = document.createElement('button');
  318.  
  319. const presssolveCopy1 = () => {
  320. solveCopy.style.borderBottom = '0px';
  321. solveCopy.style.marginBottom = '4px';
  322. solveCopy.style.top = '4px';
  323. };
  324.  
  325. // Function to revert the border-bottom when the button is released
  326. const releasesolveCopy1 = () => {
  327. solveCopy.style.borderBottom = '4px solid #2b70c9';
  328. solveCopy.style.marginBottom = '0px';
  329. solveCopy.style.top = '0px';
  330. };
  331.  
  332. // Add event listeners for mousedown, mouseup, and mouseleave
  333. solveCopy.addEventListener('mousedown', presssolveCopy1);
  334. solveCopy.addEventListener('mouseup', releasesolveCopy1);
  335. solveCopy.addEventListener('mouseleave', releasesolveCopy1);
  336.  
  337.  
  338. const pauseCopy = document.createElement('button');
  339.  
  340. const presspauseCopy2 = () => {
  341. pauseCopy.style.borderBottom = '0px';
  342. pauseCopy.style.marginBottom = '4px';
  343. pauseCopy.style.top = '4px';
  344. };
  345.  
  346. // Function to revert the border-bottom when the button is released
  347. const releasepauseCopy2 = () => {
  348. pauseCopy.style.borderBottom = '4px solid #ff9600';
  349. pauseCopy.style.marginBottom = '0px';
  350. pauseCopy.style.top = '0px';
  351. };
  352.  
  353. // Add event listeners for mousedown, mouseup, and mouseleave
  354. pauseCopy.addEventListener('mousedown', presspauseCopy2);
  355. pauseCopy.addEventListener('mouseup', releasepauseCopy2);
  356. pauseCopy.addEventListener('mouseleave', releasepauseCopy2);
  357.  
  358.  
  359. solveCopy.id = 'solveAllButton';
  360. solveCopy.innerHTML = solvingIntervalId ? 'PAUSE SOLVE' : 'SOLVE ALL';
  361. solveCopy.disabled = false;
  362. pauseCopy.innerHTML = 'SOLVE';
  363.  
  364. const solveCopyStyle = `
  365. position: relative;
  366. min-width: 150px;
  367. font-size: 17px;
  368. border: none;
  369. border-bottom: 4px solid #2b70c9;
  370. border-radius: 16px;
  371. padding: 13px 16px;
  372. transform: translateZ(0);
  373. transition: filter .0s;
  374. font-weight: 700;
  375. letter-spacing: .8px;
  376. background: #1cb0f6;
  377. color: rgb(var(--color-snow));
  378. margin-left: 20px;
  379. cursor: pointer;
  380. `;
  381.  
  382. const pauseCopyStyle = `
  383. position: relative;
  384. min-width: 100px;
  385. font-size: 17px;
  386. border: none;
  387. border-bottom: 4px solid #ff9600;
  388. border-radius: 16px;
  389. padding: 13px 16px;
  390. transform: translateZ(0);
  391. transition: filter .0s;
  392. font-weight: 700;
  393. letter-spacing: .8px;
  394. background: #ffc800;
  395. color: rgb(var(--color-snow));
  396. margin-left: 20px;
  397. cursor: pointer;
  398. `;
  399.  
  400. solveCopy.style.cssText = solveCopyStyle;
  401. pauseCopy.style.cssText = pauseCopyStyle;
  402.  
  403. [solveCopy, pauseCopy].forEach(button => {
  404. button.addEventListener("mousemove", () => {
  405. button.style.filter = "brightness(1.1)";
  406. });
  407. });
  408.  
  409. [solveCopy, pauseCopy].forEach(button => {
  410. button.addEventListener("mouseleave", () => {
  411. button.style.filter = "none";
  412. });
  413. });
  414.  
  415. original.parentElement.appendChild(pauseCopy);
  416. original.parentElement.appendChild(solveCopy);
  417.  
  418. solveCopy.addEventListener('click', solving);
  419. pauseCopy.addEventListener('click', solve);
  420.  
  421. //solving();
  422. }
  423. }
  424.  
  425. setInterval(addButtons, 100);
  426.  
  427.  
  428. const htmlContent = `
  429. <div class="boxFirst">
  430. <a href="https://duolingoprowebsite.framer.website" target="_blank" rel="noopener noreferrer">
  431. <div class="SeeRoadmapButton">
  432. <p class="SeeRoadmapButtonTextOne">SEE ISSUES & ROADMAP</p>
  433. <div class="SendFeedbackButtonNewTagOne">
  434. <p class="SendFeedbackButtonNewTagOneTextOne">NEW</p>
  435. </div>
  436. </div>
  437. </a>
  438. <div class="SendFeedbackButtonAndSettingsButtonBox">
  439. <div class="SendFeedbackButtonOne">
  440. <p class="SendFeedbackButtonTextOne">SEND FEEDBACK</p>
  441. </div>
  442. <div class="DuolingoProSettingsButtonOne">
  443. <p class="DuolingoProSettingsButtonOneTextOne">SETTINGS</p>
  444. <div class="SendFeedbackButtonNewTagOne">
  445. <p class="SendFeedbackButtonNewTagOneTextOne">NEW</p>
  446. </div>
  447. </div>
  448. </div>
  449. <div class="AutoSolverBoxBackground">
  450. <div class="AutoSolverBoxLayers">
  451. <div class="AutoSolverBoxAlertSectionOne">
  452. <div class="AutoSolverBoxAlertOneBox">
  453. <svg class="AutoSolverBoxAlertOneBoxIconOne" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 19" fill="none">
  454. <path id="Vector" d="M2.74565 18.5C2.18774 18.5 1.70193 18.3759 1.2882 18.1276C0.880737 17.8857 0.564169 17.5569 0.338504 17.1411C0.112839 16.7316 0 16.2786 0 15.7823C0 15.3045 0.125376 14.8485 0.376113 14.4142L7.64456 1.86814C7.90157 1.4152 8.24008 1.07394 8.66007 0.844363C9.0863 0.614788 9.53451 0.5 10.0047 0.5C10.4686 0.5 10.9105 0.614788 11.3305 0.844363C11.7505 1.07394 12.0921 1.4152 12.3554 1.86814L19.6238 14.4142C19.7493 14.6313 19.8432 14.8578 19.9059 15.0936C19.9686 15.3231 20 15.5527 20 15.7823C20 16.2786 19.8872 16.7316 19.6615 17.1411C19.4358 17.5569 19.1161 17.8857 18.7024 18.1276C18.2949 18.3759 17.8122 18.5 17.2543 18.5H2.74565ZM10.0141 11.9943C10.6159 11.9943 10.9293 11.6841 10.9543 11.0635L11.1048 6.66132C11.1174 6.35728 11.017 6.10599 10.8039 5.90743C10.597 5.70268 10.3307 5.60031 10.0047 5.60031C9.67249 5.60031 9.40289 5.69958 9.19607 5.89813C8.98915 6.09668 8.892 6.35108 8.90452 6.66132L9.04557 11.0635C9.0707 11.6841 9.39345 11.9943 10.0141 11.9943ZM10.0141 15.2704C10.3526 15.2704 10.6409 15.168 10.8791 14.9632C11.1174 14.7523 11.2365 14.4824 11.2365 14.1535C11.2365 13.8309 11.1174 13.5641 10.8791 13.3532C10.6409 13.1421 10.3526 13.0367 10.0141 13.0367C9.66931 13.0367 9.37786 13.1421 9.13964 13.3532C8.90143 13.5641 8.78233 13.8309 8.78233 14.1535C8.78233 14.4824 8.90143 14.7523 9.13964 14.9632C9.38411 15.168 9.67557 15.2704 10.0141 15.2704Z"/>
  455. </svg>
  456. <p class="AutoSolverBoxAlertOneBoxTextOne">Stories are not supported yet</p>
  457. </div>
  458. <div class="AutoSolverBoxAlertTwoBox">
  459. <svg class="AutoSolverBoxAlertTwoBoxIconOne" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 21" fill="none">
  460. <path id="Vector" d="M9.99998 20.5C8.63214 20.5 7.34419 20.2378 6.13613 19.7134C4.92808 19.1953 3.86384 18.476 2.94343 17.5551C2.023 16.6342 1.30073 15.5727 0.776601 14.3705C0.258868 13.1619 0 11.8701 0 10.4952C0 9.12667 0.258868 7.84131 0.776601 6.63907C1.30073 5.43044 2.01981 4.3657 2.93384 3.44483C3.85426 2.52398 4.91849 1.80455 6.12655 1.28657C7.3346 0.762189 8.62255 0.5 9.99039 0.5C11.3582 0.5 12.6462 0.762189 13.8543 1.28657C15.0687 1.80455 16.1329 2.52398 17.0469 3.44483C17.9674 4.3657 18.6896 5.43044 19.2138 6.63907C19.7379 7.84131 20 9.12667 20 10.4952C20 11.8701 19.7379 13.1619 19.2138 14.3705C18.6896 15.5727 17.9674 16.6342 17.0469 17.5551C16.1329 18.476 15.0719 19.1953 13.8639 19.7134C12.6558 20.2378 11.3678 20.5 9.99998 20.5ZM9.99998 12.0588C10.6136 12.0588 10.9332 11.739 10.9588 11.0995L11.1121 6.56234C11.1249 6.24899 11.0227 5.99 10.8054 5.78535C10.5944 5.57433 10.3228 5.46881 9.99039 5.46881C9.65163 5.46881 9.37678 5.57113 9.16585 5.77576C8.95492 5.98039 8.85584 6.24259 8.86863 6.56234L9.01244 11.0995C9.03802 11.739 9.36719 12.0588 9.99998 12.0588ZM9.99998 15.4352C10.3451 15.4352 10.6392 15.3297 10.8821 15.1186C11.1249 14.9013 11.2464 14.623 11.2464 14.2841C11.2464 13.9516 11.1249 13.6766 10.8821 13.4592C10.6392 13.2417 10.3451 13.1331 9.99998 13.1331C9.64843 13.1331 9.35122 13.2417 9.10832 13.4592C8.86544 13.6766 8.74399 13.9516 8.74399 14.2841C8.74399 14.623 8.86544 14.9013 9.10832 15.1186C9.3576 15.3297 9.65483 15.4352 9.99998 15.4352Z"/>
  461. </svg>
  462. <p class="AutoSolverBoxAlertTwoBoxTextOne">5s delay when activating</p>
  463. </div>
  464. <div class="AutoSolverBoxAlertTwoBox">
  465. <p class="AutoSolverBoxAlertTwoBoxTextOne" style="color: #34C759 !important;">Chests now open automatically</p>
  466. </div>
  467. </div>
  468. <div class="AutoSolverBoxTitleSectionOne">
  469. <p class="AutoSolverBoxTitleSectionOneTextOne">AutoSolver</p>
  470. <div class="AutoSolverBoxTitleSectionOneBETATagOne">
  471. <p class="AutoSolverBoxTitleSectionOneBETATagOneTextOne">2.0 BETA 6</p>
  472. </div>
  473. </div>
  474. <p class="AutoSolverBoxTitleSectionTwoTextOne">How many lessons would you like to AutoSolve?</p>
  475. <div class="AutoSolverBoxSectionThreeBox">
  476. <div class="AutoSolverBoxSectionThreeBoxSectionOne">
  477. <button class="AutoSolverBoxRepeatNumberDownButton">-</button>
  478. <div class="AutoSolverBoxRepeatNumberDisplay">
  479. <div class="number">0</div>
  480. </div>
  481. <button class="AutoSolverBoxRepeatNumberUpButton">+</button>
  482. </div>
  483. <div class="AutoSolverBoxSectionThreeBoxSectionTwo" id="AutoSolverBoxSectionThreeBoxSectionTwoIDOne">
  484. <div class="AutoSolverBoxSectionThreeBoxSectionTwoTextOne">Practice Only Mode</div>
  485. <button class="AutoSolverBoxSectionThreeBoxSectionTwoButton" id="AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOne">ON</button>
  486. </div>
  487. <div class="AutoSolverBoxSectionThreeBoxSectionTwo" id="AutoSolverBoxSectionThreeBoxSectionTwoIDTwo">
  488. <div class="AutoSolverBoxSectionThreeBoxSectionTwoTextOne">Repeat Lesson Mode</div>
  489. <button class="AutoSolverBoxSectionThreeBoxSectionTwoButton" id="AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwo">ON</button>
  490. </div>
  491. <button class="AutoSolverBoxRepeatStartButton">START</button>
  492. </div>
  493. </div>
  494. </div>
  495. </div>
  496. `;
  497.  
  498. const cssContent = `
  499. .boxFirst {
  500. display: inline-flex;
  501. flex-direction: column;
  502. align-items: flex-end;
  503. gap: 8px;
  504. position: fixed; /* Fix the position to the bottom-right corner */
  505. bottom: 24px;
  506. right: 24px;
  507. z-index: 2;
  508. }
  509.  
  510. .SendFeedbackButtonAndSettingsButtonBox {
  511. display: flex;
  512. align-items: center;
  513. gap: 8px;
  514. align-self: stretch;
  515.  
  516. }
  517.  
  518. .DuolingoProSettingsButtonOne {
  519. position: relative;
  520. display: flex;
  521. height: 48px;
  522. width: calc(100% - 0px);
  523. padding: 16px 9px 16px 16px;
  524. justify-content: center;
  525. align-items: center;
  526. gap: 8px;
  527.  
  528. border-radius: 8px;
  529. border: 2px solid rgba(0, 0, 0, 0.20);
  530. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  531. background: #007AFF;
  532.  
  533. cursor: pointer;
  534. transition: .1s;
  535.  
  536. width: auto;
  537. }
  538.  
  539. .DuolingoProSettingsButtonOne:hover {
  540. filter: brightness(0.95);
  541. }
  542.  
  543. .DuolingoProSettingsButtonOne:active {
  544. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  545. height: 46px;
  546. margin-top: 2px;
  547.  
  548. filter: brightness(0.9);
  549. }
  550.  
  551. .DuolingoProSettingsButtonOneTextOne {
  552. font-size: 16px;
  553. font-weight: 700;
  554. text-align: center;
  555. line-height: normal;
  556. color: #fff;
  557.  
  558. margin: 0px;
  559.  
  560. user-select: none; // chrome and Opera
  561. -moz-user-select: none; // Firefox
  562. -webkit-text-select: none; // IOS Safari
  563. -webkit-user-select: none; // Safari
  564. }
  565.  
  566. .SendFeedbackButtonOne {
  567. position: relative;
  568. display: flex;
  569. height: 48px;
  570. width: calc(100% - 0px);
  571. padding: 16px 16px 16px 16px;
  572. justify-content: center;
  573. align-items: center;
  574. gap: 8px;
  575.  
  576. border-radius: 8px;
  577. border: 2px solid rgba(0, 0, 0, 0.20);
  578. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  579. background: #007AFF;
  580.  
  581. cursor: pointer;
  582. transition: .1s;
  583.  
  584. width: auto;
  585. }
  586.  
  587. .SendFeedbackButtonOne:hover {
  588. filter: brightness(0.95);
  589. }
  590.  
  591. .SendFeedbackButtonOne:active {
  592. height: 46px;
  593. margin-top: 2px;
  594. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  595.  
  596. filter: brightness(0.9);
  597. }
  598.  
  599. .SendFeedbackButtonTextOne {
  600. font-size: 16px;
  601. font-weight: 700;
  602. text-align: center;
  603. line-height: normal;
  604. color: #fff;
  605.  
  606. margin: 0px;
  607.  
  608. user-select: none; // chrome and Opera
  609. -moz-user-select: none; // Firefox
  610. -webkit-text-select: none; // IOS Safari
  611. -webkit-user-select: none; // Safari
  612. }
  613.  
  614. .SendFeedbackButtonNewTagOne {
  615. display: flex;
  616. padding: 4px;
  617. flex-direction: column;
  618. justify-content: center;
  619. align-items: center;
  620. border-radius: 4px;
  621. background: #FF2D55;
  622. border: 2px solid rgba(0, 0, 0, 0.20);
  623. }
  624.  
  625. .SendFeedbackButtonNewTagOneTextOne {
  626. color: #FFF;
  627. font-style: normal;
  628. font-weight: 700;
  629. line-height: normal;
  630. margin-top: 0px;
  631. margin-bottom: 0px;
  632. font-size: 12px;
  633.  
  634. user-select: none; // chrome and Opera
  635. -moz-user-select: none; // Firefox
  636. -webkit-text-select: none; // IOS Safari
  637. -webkit-user-select: none; // Safari
  638. }
  639.  
  640. .SeeRoadmapButton {
  641. position: relative;
  642. display: flex;
  643. height: 48px;
  644. width: calc(100% - 0px);
  645. padding: 16px 9px 16px 16px;
  646. justify-content: center;
  647. align-items: center;
  648. gap: 8px;
  649.  
  650. border-radius: 8px;
  651. border: 2px solid rgba(0, 0, 0, 0.20);
  652. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  653. background: #007AFF;
  654.  
  655. cursor: pointer;
  656. transition: .1s;
  657.  
  658. width: auto;
  659. }
  660.  
  661. .SeeRoadmapButton:hover {
  662. filter: brightness(0.95);
  663. }
  664.  
  665. .SeeRoadmapButton:active {
  666. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  667. height: 46px;
  668. margin-top: 2px;
  669.  
  670. filter: brightness(0.9);
  671. }
  672.  
  673.  
  674. .SeeRoadmapButtonTextOne {
  675. font-size: 16px;
  676. font-weight: 700;
  677. text-align: center;
  678. line-height: normal;
  679. color: #fff;
  680.  
  681. margin: 0px;
  682.  
  683. user-select: none; // chrome and Opera
  684. -moz-user-select: none; // Firefox
  685. -webkit-text-select: none; // IOS Safari
  686. -webkit-user-select: none; // Safari
  687. }
  688.  
  689. .AutoSolverBoxBackground {
  690. display: flex;
  691. padding: 16px;
  692. flex-direction: column;
  693. justify-content: center;
  694. align-items: center;
  695. gap: 8px;
  696.  
  697. border-radius: 16px;
  698. border: 2px solid rgb(var(--color-swan));
  699. background: rgb(var(--color-snow));
  700.  
  701. width: 300px;
  702. }
  703.  
  704. .AutoSolverBoxLayers {
  705. display: flex;
  706. width: 100%;
  707. flex-direction: column;
  708. align-items: flex-start;
  709. gap: 8px;
  710. }
  711.  
  712. .AutoSolverBoxAlertSectionOne {
  713. display: flex;
  714. width: 100%;
  715. flex-direction: column;
  716. align-items: flex-start;
  717. gap: 16px;
  718. padding-bottom: 8px;
  719. }
  720.  
  721. .AutoSolverBoxAlertOneBox {
  722. display: flex;
  723. align-items: center;
  724. gap: 8px;
  725. height: 20px;
  726.  
  727. cursor: default;
  728. }
  729.  
  730. .AutoSolverBoxAlertOneBoxIconOne {
  731. width: 20px;
  732. height: 18px;
  733.  
  734. fill: #FF2D55;
  735. }
  736.  
  737. .AutoSolverBoxAlertOneBoxTextOne {
  738. color: #FF4B4B;
  739. font-weight: 700;
  740. font-size: 16px;
  741.  
  742. margin-bottom: 0px;
  743. }
  744.  
  745. .AutoSolverBoxAlertTwoBox {
  746. display: inline-flex;
  747. align-items: center;
  748. gap: 8px;
  749. height: 20px;
  750.  
  751. cursor: default;
  752. }
  753.  
  754. .AutoSolverBoxAlertTwoBoxIconOne {
  755. width: 20px !important;
  756. height: 20px !important;
  757.  
  758. fill: #FF9500;
  759. }
  760.  
  761. .AutoSolverBoxAlertTwoBoxTextOne {
  762. color: #FF9500;
  763. font-weight: 700;
  764. font-size: 16px;
  765.  
  766. margin-bottom: 0px;
  767. }
  768.  
  769. .AutoSolverBoxSectionThreeBox {
  770. display: flex;
  771.  
  772. flex-direction: column;
  773. align-items: flex-start;
  774. gap: 8px;
  775.  
  776. height: 100%;
  777. width: 100%;
  778. }
  779.  
  780. .AutoSolverBoxTitleSectionOne {
  781. display: flex;
  782. justify-content: space-between;
  783. align-items: center;
  784. align-self: stretch;
  785. padding-bottom: 8px;
  786. padding: 0px;
  787. }
  788.  
  789. .AutoSolverBoxTitleSectionOneTextOne {
  790. color: rgb(var(--color-eel));
  791. font-style: normal;
  792. font-weight: 700;
  793. font-size: 24px;
  794. margin: 0px;
  795.  
  796. cursor: default;
  797. }
  798.  
  799. .AutoSolverBoxTitleSectionOneBETATagOne {
  800. display: flex;
  801. height: 36px;
  802. padding-right: 8px;
  803. padding-left: 8px;
  804. flex-direction: column;
  805. justify-content: center;
  806. align-items: center;
  807. border-radius: 8px;
  808. background: #FF2D55;
  809. border: 2px solid rgba(0, 0, 0, 0.20);
  810. }
  811.  
  812. .AutoSolverBoxTitleSectionOneBETATagOneTextOne {
  813. color: #FFF;
  814. font-style: normal;
  815. font-weight: 700;
  816. line-height: normal;
  817. margin-top: 0px;
  818. margin-bottom: 0px;
  819. font-size: 16px;
  820.  
  821. cursor: default;
  822. }
  823.  
  824. .AutoSolverBoxTitleSectionTwoTextOne {
  825. color: rgb(var(--color-eel), 0.8);
  826.  
  827. height: 44px;
  828. font-weight: 700;
  829. font-size: 16px;
  830. margin: 0px;
  831. margin-top: -2px;
  832.  
  833. cursor: default;
  834. }
  835.  
  836. .AutoSolverBoxSectionThreeBoxSectionOne {
  837. height: 100%;
  838. width: 100%;
  839. display: flex;
  840.  
  841. justify-content: center;
  842. align-items: center;
  843. gap: 8px
  844. }
  845.  
  846. .AutoSolverBoxRepeatNumberDownButton {
  847. position: relative;
  848. display: flex;
  849. width: 48px;
  850. height: 48px;
  851. flex-direction: column;
  852. justify-content: center;
  853. align-items: center;
  854. gap: 8px;
  855. flex-shrink: 0;
  856.  
  857. border-radius: 8px;
  858. border: 2px solid rgba(0, 0, 0, 0.20);
  859. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  860. background: #007AFF;
  861.  
  862. cursor: pointer;
  863. transition: .1s;
  864.  
  865. color: #FFF;
  866. text-align: center;
  867. font-size: 16px;
  868. font-style: normal;
  869. font-weight: 700;
  870. line-height: normal;
  871. }
  872.  
  873. .AutoSolverBoxRepeatNumberDownButton:hover {
  874. filter: brightness(0.95);
  875. }
  876.  
  877. .AutoSolverBoxRepeatNumberDownButton:active {
  878. margin-top: 2px;
  879. height: 46px;
  880.  
  881. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  882.  
  883. filter: brightness(0.9);
  884. }
  885.  
  886. .AutoSolverBoxRepeatNumberDisplay {
  887. position: relative;
  888. text-align: center;
  889.  
  890. display: inline-flex;
  891. height: 48px;
  892. width: 100%;
  893. padding: 16px;
  894. justify-content: center;
  895. align-items: center;
  896. gap: 8px;
  897.  
  898. font-size: 16px;
  899. font-weight: 700;
  900.  
  901. border-radius: 8px;
  902. border: 2px solid rgb(var(--color-eel), 0.2);
  903. background: rgb(var(--color-swan), 0.8);
  904.  
  905. cursor: default;
  906.  
  907. color: rgb(var(--color-eel));
  908. text-align: center;
  909. }
  910.  
  911. .AutoSolverBoxRepeatNumberUpButton {
  912. position: relative;
  913. display: flex;
  914. width: 48px;
  915. height: 48px;
  916. flex-direction: column;
  917. justify-content: center;
  918. align-items: center;
  919. gap: 8px;
  920. flex-shrink: 0;
  921.  
  922. border-radius: 8px;
  923. border: 2px solid rgba(0, 0, 0, 0.20);
  924. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  925. background: #007AFF;
  926.  
  927. cursor: pointer;
  928. transition: .1s;
  929.  
  930. color: #FFF;
  931. text-align: center;
  932. font-size: 16px;
  933. font-style: normal;
  934. font-weight: 700;
  935. line-height: normal;
  936. }
  937.  
  938. .AutoSolverBoxRepeatNumberUpButton:hover {
  939. filter: brightness(0.95);
  940. }
  941.  
  942. .AutoSolverBoxRepeatNumberUpButton:active {
  943. margin-top: 2px;
  944. height: 46px;
  945.  
  946. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  947.  
  948. filter: brightness(0.9);
  949. }
  950.  
  951. .AutoSolverBoxSectionThreeBoxSectionTwo {
  952. height: 100%;
  953. width: 100%;
  954. display: flex;
  955. justify-content: center;
  956. align-items: center;
  957. gap: 8px;
  958. }
  959.  
  960. .AutoSolverBoxSectionThreeBoxSectionTwoTextOne {
  961. position: relative;
  962. text-align: center;
  963. display: inline-flex;
  964. height: 48px;
  965. width: 100%;
  966. justify-content: left;
  967. align-items: center;
  968. gap: 8px;
  969. font-size: 16px;
  970. font-weight: 700;
  971. border-radius: 8px;
  972. cursor: default;
  973. color: rgb(var(--color-eel));
  974. text-align: left;
  975. }
  976.  
  977. .AutoSolverBoxSectionThreeBoxSectionTwoButton {
  978. position: relative;
  979. display: flex;
  980. width: 64px;
  981. height: 48px;
  982. flex-direction: column;
  983. justify-content: center;
  984. align-items: center;
  985. gap: 8px;
  986. flex-shrink: 0;
  987.  
  988. border-radius: 8px;
  989. border: 2px solid rgba(0, 0, 0, 0.20);
  990. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  991. background: #007AFF;
  992.  
  993. cursor: pointer;
  994. transition: .1s;
  995.  
  996. color: rgb(var(--color-eel));
  997. text-align: center;
  998. font-size: 16px;
  999. font-style: normal;
  1000. font-weight: 700;
  1001. line-height: normal;
  1002. }
  1003.  
  1004. .AutoSolverBoxSectionThreeBoxSectionTwoButton:hover {
  1005. filter: brightness(0.95);
  1006. }
  1007.  
  1008. .AutoSolverBoxSectionThreeBoxSectionTwoButton:active {
  1009. height: 46px;
  1010. margin-top: 2px;
  1011.  
  1012. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  1013.  
  1014. filter: brightness(0.9);
  1015. }
  1016.  
  1017. .AutoSolverBoxRepeatStartButton {
  1018. position: relative;
  1019. display: flex;
  1020. height: 48px;
  1021. width: 100%;
  1022. justify-content: center;
  1023. align-items: center;
  1024. gap: 8px;
  1025. align-self: stretch;
  1026.  
  1027. font-size: 16px;
  1028. border-radius: 8px;
  1029. border: 2px solid rgba(0, 0, 0, 0.20);
  1030. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  1031. background: #007AFF;
  1032. font-weight: 700;
  1033. color: #FFF;
  1034. text-align: center;
  1035.  
  1036. cursor: pointer;
  1037. transition: .1s;
  1038. }
  1039.  
  1040. .AutoSolverBoxRepeatStartButton:hover {
  1041. filter: brightness(0.95);
  1042. }
  1043.  
  1044. .AutoSolverBoxRepeatStartButton:active {
  1045. height: 46px;
  1046. margin-top: 2px;
  1047.  
  1048. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  1049.  
  1050. filter: brightness(0.9);
  1051. }
  1052. `;
  1053.  
  1054. let injectedContainer = null;
  1055. let injectedStyleElement = null;
  1056.  
  1057. function injectContent() {
  1058. if (window.location.pathname === '/learn') {
  1059. // Inject the content if it's not already injected
  1060. if (!injectedContainer) {
  1061. // Creating a container for the overlay
  1062. injectedContainer = document.createElement('div');
  1063. injectedContainer.innerHTML = htmlContent;
  1064. document.body.appendChild(injectedContainer);
  1065.  
  1066. // Creating a style tag for CSS
  1067. injectedStyleElement = document.createElement('style');
  1068. injectedStyleElement.type = 'text/css';
  1069. injectedStyleElement.innerHTML = cssContent;
  1070. document.head.appendChild(injectedStyleElement);
  1071.  
  1072. initializeDuolingoProSystemButtons();
  1073.  
  1074. try {
  1075. let AutoSolverBoxSectionThreeBoxSectionTwoIDOneForHiding = document.querySelector('#AutoSolverBoxSectionThreeBoxSectionTwoIDOne');
  1076. let AutoSolverBoxSectionThreeBoxSectionTwoIDTwoForHiding = document.querySelector('#AutoSolverBoxSectionThreeBoxSectionTwoIDTwo');
  1077. const AutoSolverBoxBackgroundForHiding = document.querySelector('.AutoSolverBoxBackground');
  1078.  
  1079. if (!AutoSolverSettingsShowAutoSolverBox) {
  1080. AutoSolverBoxBackgroundForHiding.remove();
  1081. } else if (AutoSolverSettingsShowAutoSolverBox) {
  1082. initializeAutoSolverBoxButtonInteractiveness();
  1083. something();
  1084. if (!AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox) {
  1085. AutoSolverBoxSectionThreeBoxSectionTwoIDOneForHiding.remove();
  1086. }
  1087. if (!AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox) {
  1088. AutoSolverBoxSectionThreeBoxSectionTwoIDTwoForHiding.remove();
  1089. }
  1090. } else {
  1091. console.log('error 5');
  1092. }
  1093. } catch(error) {
  1094. }
  1095.  
  1096. }
  1097. } else {
  1098. // Remove the content if it was previously injected
  1099. if (injectedContainer) {
  1100. document.body.removeChild(injectedContainer);
  1101. document.head.removeChild(injectedStyleElement);
  1102. injectedContainer = null;
  1103. injectedStyleElement = null;
  1104. }
  1105. }
  1106. }
  1107.  
  1108. function initializeDuolingoProSystemButtons() {
  1109. //console.log('yeah yeah yeah');
  1110. const DuolingoProSettingsButtonOne = document.querySelector('.DuolingoProSettingsButtonOne');
  1111. DuolingoProSettingsButtonOne.addEventListener('click', () => {
  1112. wasDuolingoProSettingsButtonOnePressed = true;
  1113. console.log('wasDuolingoProSettingsButtonOnePressed' + wasDuolingoProSettingsButtonOnePressed);
  1114. });
  1115.  
  1116. const SendFeedbackButton = document.querySelector('.SendFeedbackButtonOne');
  1117. SendFeedbackButton.addEventListener('click', () => {
  1118. isSendFeedbackButtonPressed = true;
  1119. console.log('isSendFeedbackButtonPressed' + isSendFeedbackButtonPressed);
  1120. });
  1121. }
  1122.  
  1123. let isAutoSolverBoxRepeatStartButtonEnabled = false;
  1124.  
  1125. function something() {
  1126. //this is new
  1127. try {
  1128. const AutoSolverBoxRepeatStartButton = document.querySelector('.AutoSolverBoxRepeatStartButton');
  1129.  
  1130. function disableHover() {
  1131. AutoSolverBoxRepeatStartButton.style.filter = '';
  1132. AutoSolverBoxRepeatStartButton.style.height = '';
  1133. AutoSolverBoxRepeatStartButton.style.marginTop = '';
  1134. AutoSolverBoxRepeatStartButton.style.borderBottom = '';
  1135. }
  1136.  
  1137. function enableHover() {
  1138. AutoSolverBoxRepeatStartButton.style.filter = 'brightness(1.0)';
  1139. AutoSolverBoxRepeatStartButton.style.height = '46px';
  1140. AutoSolverBoxRepeatStartButton.style.marginTop = '2px';
  1141. AutoSolverBoxRepeatStartButton.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  1142. }
  1143.  
  1144. if (autoSolverBoxRepeatAmount > 0) {
  1145. AutoSolverBoxRepeatStartButton.style.opacity = '100%';
  1146. AutoSolverBoxRepeatStartButton.style.cursor = 'pointer';
  1147. isAutoSolverBoxRepeatStartButtonEnabled = true;
  1148. console.log(autoSolverBoxRepeatAmount);
  1149. } else if (autoSolverBoxRepeatAmount === 0) {
  1150. AutoSolverBoxRepeatStartButton.style.opacity = '0.5';
  1151. AutoSolverBoxRepeatStartButton.style.cursor = 'not-allowed';
  1152. isAutoSolverBoxRepeatStartButtonEnabled = false;
  1153. } else {
  1154. AutoSolverBoxRepeatStartButton.style.opacity = '0.5';
  1155. AutoSolverBoxRepeatStartButton.style.cursor = 'not-allowed';
  1156. isAutoSolverBoxRepeatStartButtonEnabled = false;
  1157. }
  1158.  
  1159. if (isAutoSolverBoxRepeatStartButtonEnabled) {
  1160. disableHover();
  1161. } else {
  1162. enableHover();
  1163. }
  1164. } catch (error) {
  1165. }
  1166. //this is new end
  1167. }
  1168.  
  1169. function initializeAutoSolverBoxButtonInteractiveness() {
  1170. const AutoSolverBoxRepeatNumberDisplay = document.querySelector('.AutoSolverBoxRepeatNumberDisplay');
  1171. const AutoSolverBoxRepeatNumberDownButton = document.querySelector('.AutoSolverBoxRepeatNumberDownButton');
  1172. const AutoSolverBoxRepeatNumberUpButton = document.querySelector('.AutoSolverBoxRepeatNumberUpButton');
  1173. const AutoSolverBoxRepeatStartButton = document.querySelector('.AutoSolverBoxRepeatStartButton');
  1174.  
  1175. AutoSolverBoxRepeatNumberDisplay.textContent = autoSolverBoxRepeatAmount;
  1176. something();
  1177.  
  1178. AutoSolverBoxRepeatNumberDownButton.addEventListener('click', () => {
  1179. autoSolverBoxRepeatAmount--;
  1180. if (autoSolverBoxRepeatAmount < 0) {
  1181. autoSolverBoxRepeatAmount = 0;
  1182. }
  1183. AutoSolverBoxRepeatNumberDisplay.textContent = autoSolverBoxRepeatAmount;
  1184. sessionStorage.setItem('autoSolverBoxRepeatAmount', autoSolverBoxRepeatAmount);
  1185.  
  1186. something();
  1187. });
  1188.  
  1189. AutoSolverBoxRepeatNumberUpButton.addEventListener('click', () => {
  1190. autoSolverBoxRepeatAmount++;
  1191. AutoSolverBoxRepeatNumberDisplay.textContent = autoSolverBoxRepeatAmount;
  1192. sessionStorage.setItem('autoSolverBoxRepeatAmount', autoSolverBoxRepeatAmount);
  1193.  
  1194. something();
  1195. });
  1196.  
  1197. if (wasAutoSolverBoxRepeatStartButtonPressed === true) {
  1198. AutoSolverBoxRepeatStartButton.textContent = 'STOP';
  1199. }
  1200.  
  1201. if (autoSolverBoxRepeatAmount === 0) {
  1202. wasAutoSolverBoxRepeatStartButtonPressed = false;
  1203. sessionStorage.setItem('wasAutoSolverBoxRepeatStartButtonPressed', wasAutoSolverBoxRepeatStartButtonPressed);
  1204. AutoSolverBoxRepeatStartButton.textContent = 'START';
  1205. }
  1206.  
  1207. if (wasAutoSolverBoxRepeatStartButtonPressed === true) {
  1208. AutoSolverBoxRepeatStartButton.textContent = 'STOP';
  1209. AutoSolverBoxRepeatStartButtonActions();
  1210. }
  1211.  
  1212. function AutoSolverBoxRepeatStartButtonActions() {
  1213. if (autoSolverBoxRepeatAmount > 0) {
  1214. sessionStorage.setItem('autoSolverBoxRepeatAmount', autoSolverBoxRepeatAmount);
  1215.  
  1216. openChestThingyFunction();
  1217.  
  1218. setTimeout(function() {
  1219. if (wasAutoSolverBoxRepeatStartButtonPressed === true && autoSolverBoxRepeatAmount > 0) {
  1220. autoSolverBoxRepeatAmount--;
  1221. sessionStorage.setItem('autoSolverBoxRepeatAmount', autoSolverBoxRepeatAmount);
  1222. if (autoSolverBoxPracticeOnlyMode) {
  1223. window.location.href = "https://duolingo.com/practice";
  1224. } else if (autoSolverBoxRepeatLessonMode) {
  1225. window.location.href = "https://duolingo.com/lesson/unit/1/level/1";
  1226. } else {
  1227. window.location.href = "https://duolingo.com/lesson";
  1228. }
  1229. } else {
  1230. console.log('cancelled');
  1231. }
  1232. }, 4000);
  1233. }
  1234. }
  1235.  
  1236. //this is new
  1237. try {
  1238.  
  1239. AutoSolverBoxRepeatStartButton.addEventListener('click', () => {
  1240. if (autoSolverBoxRepeatAmount > 0) {
  1241. AutoSolverBoxRepeatStartButton.textContent = AutoSolverBoxRepeatStartButton.textContent === 'START' ? 'STOP' : 'START';
  1242. wasAutoSolverBoxRepeatStartButtonPressed = !wasAutoSolverBoxRepeatStartButtonPressed;
  1243. sessionStorage.setItem('wasAutoSolverBoxRepeatStartButtonPressed', wasAutoSolverBoxRepeatStartButtonPressed);
  1244. }
  1245.  
  1246. console.log(wasAutoSolverBoxRepeatStartButtonPressed);
  1247.  
  1248. analyticsLogsSend('Duolingo Pro AutoSolver Box START Button', wasAutoSolverBoxRepeatStartButtonPressed ? 'ON' : 'OFF')
  1249.  
  1250. setTimeout(function() {
  1251. AutoSolverBoxRepeatStartButtonActions();
  1252. }, 500);
  1253.  
  1254. });
  1255. } catch(error) {
  1256. }
  1257. //this is new end
  1258.  
  1259. try {
  1260. const AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement = document.querySelector('#AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOne');
  1261. const AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement = document.querySelector('#AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwo');
  1262.  
  1263.  
  1264. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement.addEventListener('mouseup', () => {
  1265. if (autoSolverBoxPracticeOnlyMode) {
  1266. autoSolverBoxPracticeOnlyMode = !autoSolverBoxPracticeOnlyMode;
  1267. sessionStorage.setItem('autoSolverBoxPracticeOnlyMode', autoSolverBoxPracticeOnlyMode);
  1268. updateAutoSolverToggles(AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement, autoSolverBoxPracticeOnlyMode);
  1269. } else {
  1270. autoSolverBoxPracticeOnlyMode = !autoSolverBoxPracticeOnlyMode;
  1271. autoSolverBoxRepeatLessonMode = !autoSolverBoxPracticeOnlyMode;
  1272. sessionStorage.setItem('autoSolverBoxPracticeOnlyMode', autoSolverBoxPracticeOnlyMode);
  1273. sessionStorage.setItem('autoSolverBoxRepeatLessonMode', autoSolverBoxRepeatLessonMode);
  1274. updateAutoSolverToggles(AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement, autoSolverBoxPracticeOnlyMode, AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement, autoSolverBoxRepeatLessonMode);
  1275. }
  1276. });
  1277.  
  1278. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement.addEventListener('mouseup', () => {
  1279. if (autoSolverBoxRepeatLessonMode) {
  1280. autoSolverBoxRepeatLessonMode = !autoSolverBoxRepeatLessonMode;
  1281. sessionStorage.setItem('autoSolverBoxRepeatLessonMode', autoSolverBoxRepeatLessonMode);
  1282. updateAutoSolverToggles(AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement, autoSolverBoxRepeatLessonMode);
  1283. } else {
  1284. autoSolverBoxRepeatLessonMode = !autoSolverBoxRepeatLessonMode;
  1285. autoSolverBoxPracticeOnlyMode = !autoSolverBoxRepeatLessonMode;
  1286. sessionStorage.setItem('autoSolverBoxPracticeOnlyMode', autoSolverBoxPracticeOnlyMode);
  1287. sessionStorage.setItem('autoSolverBoxRepeatLessonMode', autoSolverBoxRepeatLessonMode);
  1288. updateAutoSolverToggles(AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement, autoSolverBoxRepeatLessonMode, AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement, autoSolverBoxPracticeOnlyMode);
  1289. }
  1290. });
  1291.  
  1292. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement.addEventListener('mousedown', () => {
  1293. if (!autoSolverBoxPracticeOnlyMode) {
  1294. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement.style.border = '2px solid rgb(var(--color-swan))';
  1295. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  1296. } else {
  1297. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  1298. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  1299. }
  1300. });
  1301.  
  1302. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement.addEventListener('mousedown', () => {
  1303. if (!autoSolverBoxRepeatLessonMode) {
  1304. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement.style.border = '2px solid rgb(var(--color-swan))';
  1305. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  1306. } else {
  1307. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  1308. AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  1309. }
  1310. });
  1311.  
  1312. addEventListener('mouseup', () => {
  1313. updateAutoSolverToggles(AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement, autoSolverBoxPracticeOnlyMode);
  1314. updateAutoSolverToggles(AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement, autoSolverBoxRepeatLessonMode);
  1315. });
  1316.  
  1317. updateAutoSolverToggles(AutoSolverBoxSectionThreeBoxSectionTwoButtonIDOneElement, autoSolverBoxPracticeOnlyMode);
  1318. updateAutoSolverToggles(AutoSolverBoxSectionThreeBoxSectionTwoButtonIDTwoElement, autoSolverBoxRepeatLessonMode);
  1319.  
  1320. } catch(error) {
  1321. }
  1322.  
  1323. function updateAutoSolverToggles(element, value, oppsiteElement, oppositeValue) {
  1324. try {
  1325. element.textContent = value ? "ON" : "OFF";
  1326. oppsiteElement.textContent = value ? "OFF" : "ON";
  1327. } catch(error) {
  1328. }
  1329. try {
  1330. if (value) {
  1331. element.style.background = '#007AFF';
  1332. element.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  1333. element.style.borderBottom = '4px solid rgba(0, 0, 0, 0.20)';
  1334. element.style.color = '#fff';
  1335.  
  1336. oppsiteElement.style.background = 'rgb(var(--color-snow))';
  1337. oppsiteElement.style.border = '2px solid rgb(var(--color-swan))';
  1338. oppsiteElement.style.borderBottom = '4px solid rgb(var(--color-swan))';
  1339. oppsiteElement.style.color = '#fff';
  1340. } else {
  1341. element.style.background = 'rgb(var(--color-snow))';
  1342. element.style.border = '2px solid rgb(var(--color-swan))';
  1343. element.style.borderBottom = '4px solid rgb(var(--color-swan))';
  1344. element.style.color = 'rgb(var(--color-eel))';
  1345.  
  1346. oppsiteElement.style.background = '#007AFF';
  1347. oppsiteElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  1348. oppsiteElement.style.borderBottom = '4px solid rgba(0, 0, 0, 0.20)';
  1349. oppsiteElement.style.color = 'rgb(var(--color-eel))';
  1350. }
  1351. } catch(error) {
  1352. }
  1353. }
  1354.  
  1355. function openChestThingyFunction() {
  1356. try {
  1357. const openChestThingy = document.querySelector("button[aria-label='Open chest']");
  1358. openChestThingy.click();
  1359. } catch (error) {
  1360. }
  1361. }
  1362.  
  1363. console.log('initializeAutoSolverBoxButtonInteractiveness ran');
  1364. }
  1365.  
  1366. setInterval(injectContent, 100);
  1367.  
  1368.  
  1369. function checkURLForAutoSolverBox() {
  1370. if (window.location.pathname === '/lesson' || window.location.pathname.includes('/unit') || window.location.pathname === '/practice') {
  1371. setTimeout(function() {
  1372. if (wasAutoSolverBoxRepeatStartButtonPressed === true) {
  1373. if (DuolingoProSettingsTurboSolveMode) {
  1374. if (document.querySelector('[data-test="player-next"]')) {
  1375. solving();
  1376. } else {
  1377. checkURLForAutoSolverBox();
  1378. }
  1379. } else {
  1380. solvingIntervalId = setInterval(solve, 500);
  1381. }
  1382. } else {
  1383. console.log('error 2');
  1384. }
  1385. }, 1000);
  1386. } else {
  1387. }
  1388. }
  1389.  
  1390. checkURLForAutoSolverBox();
  1391.  
  1392.  
  1393. injectContent();
  1394.  
  1395.  
  1396. let DuolingoSiderbarPaddingThingFunctionRepeatTimes = 20;
  1397.  
  1398. function DuolingoHomeSiderbarAddPaddingFunction() {
  1399. if (window.location.pathname === '/learn') {
  1400. try {
  1401. const DuolingoSiderbarPaddingThing = document.querySelector('.Fc0NK');
  1402. if (AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox === true && AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox === true) {
  1403. DuolingoSiderbarPaddingThing.style.paddingBottom = '582px'; // or 574px if an 8px gap preferred
  1404. } else if (AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox === true || AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox === true) {
  1405. DuolingoSiderbarPaddingThing.style.paddingBottom = '526px'; // or 518px if an 8px gap preferred
  1406. } else {
  1407. DuolingoSiderbarPaddingThing.style.paddingBottom = '470px'; // or 462px if an 8px gap preferred
  1408. }
  1409. } catch(error) {
  1410. }
  1411. }
  1412. }
  1413.  
  1414. setInterval(DuolingoHomeSiderbarAddPaddingFunction, 100);
  1415.  
  1416.  
  1417. function DuolingoRemoveLearnAds() {
  1418. // if (window.location.pathname === '/learn' || window.location.pathname === '/shop') {
  1419. try {
  1420. const DuolingoRemoveLearnAdsElementOne = document.querySelector('._3bfsh');
  1421. DuolingoRemoveLearnAdsElementOne.remove();
  1422. } catch(error) {
  1423. }
  1424. // }
  1425. }
  1426.  
  1427. const RemovedByDuolingoProOneHTML = `
  1428. <div class="BlockedByDuolingoProBoxBackground">
  1429. <div class="BlockedByDuolingoProBoxSectionOne">
  1430. <p class="BlockedByDuolingoProBoxSectionOneTextOne">Ads Blocked by Duolingo Pro</p>
  1431. <p class="BlockedByDuolingoProBoxSectionOneTextTwo">HIDE</p>
  1432. </div>
  1433. <p class="BlockedByDuolingoProBoxSectionTwoTextOne">These ads were removed with ProBlock by Duolingo Pro.</p>
  1434. </div>
  1435. `;
  1436.  
  1437. const RemovedByDuolingoProOneCSS = `
  1438. .BlockedByDuolingoProBoxBackground {
  1439. display: flex;
  1440. width: 100%;
  1441. padding: 16px;
  1442. flex-direction: column;
  1443. justify-content: center;
  1444. align-items: center;
  1445. gap: 4px;
  1446. flex-shrink: 0;
  1447.  
  1448. border-radius: 16px;
  1449. border: 2px solid rgb(var(--color-swan));
  1450. background: rgb(var(--color-snow));
  1451. }
  1452.  
  1453. .BlockedByDuolingoProBoxSectionOne {
  1454. display: flex;
  1455. justify-content: space-between;
  1456. align-items: center;
  1457. align-self: stretch;
  1458. }
  1459.  
  1460. .BlockedByDuolingoProBoxSectionOneTextOne {
  1461. color: rgb(var(--color-eel));
  1462. font-size: 18px;
  1463. font-style: normal;
  1464. font-weight: 700;
  1465. line-height: normal;
  1466.  
  1467. margin: 0px;
  1468. cursor: default;
  1469. }
  1470.  
  1471. .BlockedByDuolingoProBoxSectionOneTextTwo {
  1472. color: var(--web-ui_button-color,rgb(var(--color-macaw)));
  1473. font-size: 16px;
  1474. font-style: normal;
  1475. font-weight: 700;
  1476. line-height: normal;
  1477.  
  1478. margin: 0px;
  1479. cursor: pointer;
  1480. transition: .1s;
  1481.  
  1482. user-select: none; // chrome and Opera
  1483. -moz-user-select: none; // Firefox
  1484. -webkit-text-select: none; // IOS Safari
  1485. -webkit-user-select: none; // Safari
  1486. }
  1487.  
  1488. .BlockedByDuolingoProBoxSectionOneTextTwo:hover {
  1489. filter: brightness(1.1);
  1490. }
  1491.  
  1492. .BlockedByDuolingoProBoxSectionOneTextTwo:active {
  1493. filter: brightness(1.2);
  1494. }
  1495.  
  1496. .BlockedByDuolingoProBoxSectionTwoTextOne {
  1497. align-self: stretch;
  1498.  
  1499. color: rgb(var(--color-hare));
  1500. font-size: 16px;
  1501. font-style: normal;
  1502. font-weight: 700;
  1503. line-height: normal;
  1504.  
  1505. margin: 0px;
  1506. cursor: default;
  1507. }
  1508. `;
  1509.  
  1510. let injectedRemovedByDuolingoProOneElement = null;
  1511. let injectedRemovedByDuolingoProOneStyle = null;
  1512.  
  1513. function iforgot() {
  1514. try {
  1515. // if (window.location.pathname === '/learn' || window.location.pathname === '/shop') {
  1516.  
  1517. let targetDiv = document.querySelector('.Fc0NK');
  1518.  
  1519. if (targetDiv) {
  1520.  
  1521. if (ProBlockBannerOneVisible) {
  1522.  
  1523. if (!injectedRemovedByDuolingoProOneElement) {
  1524.  
  1525. injectedRemovedByDuolingoProOneStyle = document.createElement('style');
  1526. injectedRemovedByDuolingoProOneStyle.type = 'text/css';
  1527. injectedRemovedByDuolingoProOneStyle.innerHTML = RemovedByDuolingoProOneCSS;
  1528. document.head.appendChild(injectedRemovedByDuolingoProOneStyle);
  1529.  
  1530. injectedRemovedByDuolingoProOneElement = document.createElement('div');
  1531. injectedRemovedByDuolingoProOneElement.innerHTML = RemovedByDuolingoProOneHTML;
  1532. targetDiv.appendChild(injectedRemovedByDuolingoProOneElement);
  1533. } else {
  1534. let BlockedByDuolingoProBoxSectionOneTextTwoElement = document.querySelector('.BlockedByDuolingoProBoxSectionOneTextTwo');
  1535. let BlockedByDuolingoProBoxBackgroundElement = document.querySelector('.BlockedByDuolingoProBoxBackground');
  1536.  
  1537. BlockedByDuolingoProBoxSectionOneTextTwoElement.addEventListener('click', () => {
  1538. ProBlockBannerOneVisible = false;
  1539. localStorage.setItem("ProBlockBannerOneVisible", ProBlockBannerOneVisible);
  1540. BlockedByDuolingoProBoxBackgroundElement.remove();
  1541. });
  1542.  
  1543. if (document.querySelector('.BlockedByDuolingoProBoxBackground')) {
  1544. } else {
  1545. injectedRemovedByDuolingoProOneElement = null;
  1546. injectedRemovedByDuolingoProOneStyle = null;
  1547. }
  1548.  
  1549. }
  1550. }
  1551. } else {
  1552. console.error("Target div with class 'Fc0NK' not found.");
  1553. }
  1554. // } else {
  1555. // }
  1556. } catch(error) {
  1557. }
  1558. }
  1559.  
  1560. if (DuolingoProSettingsProBlockMode) {
  1561. setInterval(iforgot, 100);
  1562. setInterval(DuolingoRemoveLearnAds, 100);
  1563. }
  1564.  
  1565.  
  1566.  
  1567. function theconsoleOne() {
  1568. console.log(autoSolverBoxPracticeOnlyMode);
  1569. console.log(autoSolverBoxRepeatLessonMode);
  1570. }
  1571. //setInterval(theconsoleOne, 1000);
  1572.  
  1573.  
  1574.  
  1575. const SendFeedbackBoxHTML = `
  1576. <div class="SendFeebackBoxShadow">
  1577. <div class="SendFeebackBoxBackground">
  1578. <div class="SendFeebackBoxLayers">
  1579.  
  1580. <div class="SendFeebackBoxSectionOne">
  1581. <p class="SendFeebackBoxSectionOneTextOne">Send Feedback for Duolingo Pro</p>
  1582. <div class="SendFeebackBoxSectionOneCancelBoxBackground">
  1583. <svg class="SendFeebackBoxSectionOneCancelBoxIconOne" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none">
  1584. <path d="M0.633789 11.4307C0.237305 11.041 0.250977 10.3506 0.620117 9.98146L4.53027 6.0713L0.620117 2.17481C0.250977 1.79884 0.237305 1.11524 0.633789 0.718757C1.03027 0.315437 1.7207 0.329109 2.08984 0.705085L5.99316 4.60841L9.89648 0.705085C10.2793 0.322273 10.9492 0.322273 11.3457 0.718757C11.749 1.11524 11.749 1.78517 11.3594 2.17481L7.46289 6.0713L11.3594 9.97462C11.749 10.3643 11.7422 11.0273 11.3457 11.4307C10.9561 11.8271 10.2793 11.8271 9.89648 11.4443L5.99316 7.54103L2.08984 11.4443C1.7207 11.8203 1.03711 11.8271 0.633789 11.4307Z"/>
  1585. </svg>
  1586. </div>
  1587. </div>
  1588.  
  1589. <!-- MULTI-LINE TEXT FIELD -->
  1590. <textarea class="SendFeebackBoxSectionTwo" id="SendFeebackBoxSectionTwoID" placeholder="Write here as much as you can with as many details as possible. Responses that are less than two sentences will be automatically ignored. "/></textarea>
  1591.  
  1592. <p class="SendFeebackBoxSectionThree">Choose Feedback Type</p>
  1593.  
  1594. <!-- MUTLIPLE CHOICE -->
  1595. <div class="SendFeebackBoxSectionFour">
  1596. <div class="SendFeebackBoxSectionFourButtonOneBackground" id="SendFeebackTypeButtonOne">
  1597. <div class="SendFeebackBoxSectionFourButtonOneIconOne"/></div>
  1598. <p class="SendFeebackBoxSectionFourButtonOneTextOne">Bug Report</p>
  1599. </div>
  1600. <div class="SendFeebackBoxSectionFourButtonOneBackground" id="SendFeebackTypeButtonTwo">
  1601. <div class="SendFeebackBoxSectionFourButtonOneIconOne"/></div>
  1602. <p class="SendFeebackBoxSectionFourButtonOneTextOne">Suggestion</p>
  1603. </div>
  1604. </div>
  1605.  
  1606. <!-- SINGLE LINE TEXT FIELD -->
  1607. <p class="SendFeebackBoxSectionThree">Choose Sender ID</p>
  1608. <div class="SendFeebackBoxSectionSix">
  1609. <div class="SendFeebackBoxSectionSixIconOneBox">
  1610. <div class="SendFeebackBoxSectionSixIconOne">
  1611. </div>
  1612. </div>
  1613. <div class="SendFeebackBoxSectionSixTextOne">My Duolingo ProID <a href="https://duolingoprowebsite.framer.website/proID" target="_blank" rel="noopener noreferrer" style="color: rgb(255, 255, 255, 0.6); font-size: 16px; font-style: normal; font-weight: 700; line-height: normal;">&nbsp;(LEARN&nbsp;MORE)</a></div>
  1614. <div class="SendFeebackBoxSectionSixIconTwoBox">
  1615. <svg class="SendFeebackBoxSectionSixIconTwo" xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
  1616. <path d="M8 16.4536C3.75928 16.4536 0.265625 12.96 0.265625 8.71191C0.265625 4.47119 3.75195 0.977539 8 0.977539C12.2407 0.977539 15.7344 4.47119 15.7344 8.71191C15.7344 12.96 12.248 16.4536 8 16.4536ZM7.80225 10.1548C8.29297 10.1548 8.62988 9.89844 8.68848 9.56152C8.68848 9.53223 8.6958 9.49561 8.6958 9.47363C8.76172 9.12939 9.07666 8.88037 9.50879 8.59473C10.2998 8.09668 10.7173 7.66455 10.7173 6.80762C10.7173 5.52588 9.53076 4.71289 8.05127 4.71289C6.73291 4.71289 5.79541 5.26953 5.50244 6.0166C5.44385 6.16309 5.40723 6.30225 5.40723 6.46338C5.40723 6.88086 5.73682 7.1958 6.16162 7.1958C6.46924 7.1958 6.71094 7.07861 6.88672 6.84424L6.96729 6.73438C7.21631 6.36084 7.5166 6.20703 7.88281 6.20703C8.36621 6.20703 8.71777 6.51465 8.71777 6.91748C8.71777 7.34961 8.39551 7.55469 7.77295 7.97949C7.23828 8.36035 6.85742 8.73389 6.85742 9.33447V9.38574C6.85742 9.89111 7.19434 10.1548 7.80225 10.1548ZM7.80225 12.6304C8.38086 12.6304 8.82764 12.2642 8.82764 11.7002C8.82764 11.1509 8.38818 10.77 7.80225 10.77C7.21631 10.77 6.75488 11.1436 6.75488 11.7002C6.75488 12.2568 7.21631 12.6304 7.80225 12.6304Z"/>
  1617. </svg>
  1618. </div>
  1619. </div>
  1620.  
  1621. <div class="SendFeebackBoxSectionSeven">
  1622. <div class="SendFeebackBoxSectionSevenBoxTwo">
  1623. <div class="SendFeebackBoxSectionSevenBoxTwoIconOneBox">
  1624. <div class="SendFeebackBoxSectionSevenBoxTwoIconOne">
  1625. </div>
  1626. </div>
  1627. <p class="SendFeebackBoxSectionSevenBoxTwoTextOne">Anonymous (Not available in BETA)</p>
  1628. <div class="SendFeebackBoxSectionSevenBoxTwoIconTwoBox">
  1629. <svg class="SendFeebackBoxSectionSevenBoxTwoIconTwo" xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
  1630. <path d="M8 16.4536C3.75928 16.4536 0.265625 12.96 0.265625 8.71191C0.265625 4.47119 3.75195 0.977539 8 0.977539C12.2407 0.977539 15.7344 4.47119 15.7344 8.71191C15.7344 12.96 12.248 16.4536 8 16.4536ZM7.80225 10.1548C8.29297 10.1548 8.62988 9.89844 8.68848 9.56152C8.68848 9.53223 8.6958 9.49561 8.6958 9.47363C8.76172 9.12939 9.07666 8.88037 9.50879 8.59473C10.2998 8.09668 10.7173 7.66455 10.7173 6.80762C10.7173 5.52588 9.53076 4.71289 8.05127 4.71289C6.73291 4.71289 5.79541 5.26953 5.50244 6.0166C5.44385 6.16309 5.40723 6.30225 5.40723 6.46338C5.40723 6.88086 5.73682 7.1958 6.16162 7.1958C6.46924 7.1958 6.71094 7.07861 6.88672 6.84424L6.96729 6.73438C7.21631 6.36084 7.5166 6.20703 7.88281 6.20703C8.36621 6.20703 8.71777 6.51465 8.71777 6.91748C8.71777 7.34961 8.39551 7.55469 7.77295 7.97949C7.23828 8.36035 6.85742 8.73389 6.85742 9.33447V9.38574C6.85742 9.89111 7.19434 10.1548 7.80225 10.1548ZM7.80225 12.6304C8.38086 12.6304 8.82764 12.2642 8.82764 11.7002C8.82764 11.1509 8.38818 10.77 7.80225 10.77C7.21631 10.77 6.75488 11.1436 6.75488 11.7002C6.75488 12.2568 7.21631 12.6304 7.80225 12.6304Z"/>
  1631. </svg>
  1632. </div>
  1633. </div>
  1634. <div class="SendFeebackBoxSectionSevenBoxOne">
  1635. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1636. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1637. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1638. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1639. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1640. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1641. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1642. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1643. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1644. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1645. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1646. <div class="SendFeebackBoxSectionSevenBoxOneBoxOne"></div>
  1647. </div>
  1648. </div>
  1649.  
  1650. <!-- SUBMIT BUTTON -->
  1651. <div class="SendFeedbackBoxSectionEight">
  1652. <a class="SendFeebackBoxSectionEightEmailButton" href="mailto:murk.hornet.0k@icloud.com">CONTACT VIA EMAIL</a>
  1653. <button class="SendFeebackBoxSectionEightSendButton" id="SendFeebackBoxSectionEightSendButton">SEND</button>
  1654. </div>
  1655.  
  1656. </div>
  1657. </div>
  1658. </div>
  1659. `;
  1660.  
  1661. const SendFeedbackBoxCSS = `
  1662. .SendFeebackBoxShadow {
  1663. position: fixed;
  1664. display: flex;
  1665. width: 100%;
  1666. height: 100vh;
  1667. justify-content: center;
  1668. align-items: center;
  1669. flex-shrink: 0;
  1670.  
  1671. background: rgba(0, 0, 0, 0.5);
  1672. backdrop-filter: blur(8px);
  1673.  
  1674. z-index: 2;
  1675. top: 0px;
  1676. bottom: 0px;
  1677. right: 0px;
  1678. left: 0px;
  1679. }
  1680.  
  1681. .SendFeebackBoxBackground {
  1682. display: flex;
  1683. padding: 16px;
  1684. justify-content: center;
  1685. align-items: center;
  1686. gap: 16px;
  1687.  
  1688. border-radius: 16px;
  1689. border: 2px solid rgb(var(--color-swan));
  1690. background: rgb(var(--color-snow));
  1691.  
  1692. width: 80%;
  1693. max-width: 500px;
  1694. min-width: 368px;
  1695. }
  1696.  
  1697. .SendFeebackBoxLayers {
  1698. display: flex;
  1699. flex-direction: column;
  1700. justify-content: center;
  1701. align-items: center;
  1702. gap: 8px;
  1703.  
  1704. width: 100%;
  1705. }
  1706.  
  1707. form {
  1708. width: 100%;
  1709. display: flex;
  1710. flex-direction: column;
  1711. justify-content: center;
  1712. align-items: center;
  1713. gap: 8px;
  1714. }
  1715.  
  1716. .SendFeebackBoxSectionOne {
  1717. display: flex;
  1718. justify-content: space-between;
  1719. align-items: center;
  1720.  
  1721. gap: 16px;
  1722. width: 100%;
  1723. height: 38px;
  1724. }
  1725.  
  1726. .SendFeebackBoxSectionOneTextOne {
  1727. color: rgb(var(--color-eel));
  1728. font-size: 24px;
  1729. font-style: normal;
  1730. font-weight: 700;
  1731. line-height: normal;
  1732.  
  1733. margin-top: 0px;
  1734. margin-bottom: 0px;
  1735.  
  1736. height: 32px;
  1737.  
  1738. cursor: default;
  1739. }
  1740.  
  1741. .SendFeebackBoxSectionOneCancelBoxBackground {
  1742. display: flex;
  1743. width: 34px;
  1744. height: 36px;
  1745. flex-shrink: 0;
  1746. flex-direction: column;
  1747. justify-content: center;
  1748. align-items: center;
  1749.  
  1750. background: rgb(var(--color-snow));
  1751.  
  1752. border-radius: 8px;
  1753. border: 2px solid rgb(var(--color-eel), 0.2);
  1754. border-bottom: 4px solid rgb(var(--color-eel), 0.2);
  1755.  
  1756. cursor: pointer;
  1757. transition: .1s;
  1758. }
  1759.  
  1760. .SendFeebackBoxSectionOneCancelBoxBackground:hover {
  1761. filter: brightness(0.95);
  1762. }
  1763.  
  1764. .SendFeebackBoxSectionOneCancelBoxBackground:active {
  1765. height: 34px;
  1766.  
  1767. border-bottom: 2px solid rgb(var(--color-eel), 0.2);
  1768. margin-top: 2px;
  1769. filter: brightness(0.9);
  1770. }
  1771.  
  1772. .SendFeebackBoxSectionOneCancelBoxIconOne {
  1773. display: flex;
  1774. width: 12px;
  1775. height: 12px;
  1776. flex-direction: column;
  1777. justify-content: center;
  1778. flex-shrink: 0;
  1779.  
  1780. fill: rgb(var(--color-eel), 0.4);
  1781. }
  1782.  
  1783. .SendFeebackBoxSectionTwo {
  1784. display: flex;
  1785. width: 100%;
  1786. height: 150px;
  1787. resize: vertical;
  1788.  
  1789. padding: 8px;
  1790.  
  1791. box-sizing: border-box;
  1792.  
  1793. justify-content: center;
  1794. align-items: center;
  1795.  
  1796. border-radius: 8px;
  1797. border: 2px solid rgb(var(--color-eel), 0.2);
  1798. background: rgb(var(--color-swan), 0.4);
  1799.  
  1800.  
  1801. color: rgb(var(--color-eel));
  1802. placeholder-color: rgb(var(--color-swan));
  1803. font-size: 16px;
  1804. font-style: normal;
  1805. font-weight: 700;
  1806. line-height: normal;
  1807. }
  1808.  
  1809. .SendFeebackBoxSectionTwo::placeholder {
  1810. font-weight: 700;
  1811. }
  1812.  
  1813. .SendFeebackBoxSectionTwo:focus {
  1814. border: 2px solid #007AFF;
  1815. }
  1816.  
  1817. .SendFeebackBoxSectionThree {
  1818. display: flex;
  1819. width: 100%;
  1820. flex-direction: column;
  1821. justify-content: center;
  1822.  
  1823. color: rgb(var(--color-eel));
  1824. font-size: 16px;
  1825. font-style: normal;
  1826. font-weight: 700;
  1827. line-height: normal;
  1828.  
  1829. cursor: default;
  1830.  
  1831. margin-top: 0px;
  1832. margin-bottom: 0px;
  1833.  
  1834. height: 32px;
  1835. }
  1836.  
  1837. .SendFeebackBoxSectionFour {
  1838. display: flex;
  1839. width: 100%;
  1840. justify-content: center;
  1841. align-items: center;
  1842. align-self: stretch;
  1843. gap: 8px;
  1844. }
  1845.  
  1846. .SendFeebackBoxSectionFourButtonOneBackground {
  1847. display: flex;
  1848. height: 54px;
  1849. align-items: center;
  1850. flex: 1 0 0;
  1851.  
  1852. border-radius: 8px;
  1853. border: 2px solid rgb(var(--color-swan));
  1854. border-bottom: 4px solid rgb(var(--color-swan));
  1855. background: rgb(var(--color-snow));
  1856.  
  1857. cursor: pointer;
  1858. transition: .1s;
  1859. }
  1860.  
  1861. .SendFeebackBoxSectionFourButtonOneBackground:hover {
  1862. filter: brightness(0.95);
  1863. }
  1864.  
  1865. .SendFeebackBoxSectionFourButtonOneBackground:active {
  1866. height: 52px;
  1867.  
  1868. border-bottom: 2px solid rgb(var(--color-swan));
  1869.  
  1870. filter: brightness(0.9);
  1871. margin-top: 2px;
  1872. }
  1873.  
  1874. .SendFeebackBoxSectionFourButtonOneIconOneBox {
  1875. display: flex;
  1876. width: 48px;
  1877. height: 48px;
  1878. justify-content: center;
  1879. align-items: center;
  1880. }
  1881.  
  1882. .SendFeebackBoxSectionFourButtonOneIconOne {
  1883. appearance: none;
  1884. width: 20px;
  1885. height: 20px;
  1886. flex-shrink: 0;
  1887. margin-right: 16px;
  1888. margin-left: 16px;
  1889.  
  1890. border-radius: 20px;
  1891. border: 4px solid rgb(var(--color-swan), 0.4);
  1892. background: rgb(var(--color-swan), 0.2);
  1893. opacity: 100% !important;
  1894.  
  1895. cursor: pointer;
  1896. }
  1897.  
  1898. .SendFeebackBoxSectionFourButtonOneTextOne {
  1899. flex: 1 0 0;
  1900.  
  1901. color: rgb(var(--color-swan));
  1902. font-size: 16px;
  1903. font-style: normal;
  1904. font-weight: 700;
  1905. line-height: normal;
  1906.  
  1907. margin: 0px;
  1908.  
  1909. user-select: none; // chrome and Opera
  1910. -moz-user-select: none; // Firefox
  1911. -webkit-text-select: none; // IOS Safari
  1912. -webkit-user-select: none; // Safari
  1913. }
  1914.  
  1915. .SendFeebackBoxSectionFourButtonOneIconTwoBox {
  1916. display: flex;
  1917. width: 48px;
  1918. height: 48px;
  1919. justify-content: center;
  1920. align-items: center;
  1921. }
  1922.  
  1923. .SendFeebackBoxSectionFourButtonOneIconTwo {
  1924. display: flex;
  1925. width: 16px;
  1926. height: 16px;
  1927. flex-direction: column;
  1928. justify-content: center;
  1929. align-items: center;
  1930.  
  1931. color: rgba(255, 45, 85, 0.00);
  1932. text-align: center;
  1933. font-size: 15px;
  1934. font-style: normal;
  1935. font-weight: 700;
  1936. line-height: normal;
  1937. fill: #FF2D55;
  1938. }
  1939.  
  1940.  
  1941. .SendFeebackBoxSectionSix {
  1942. display: flex;
  1943. height: 54px;
  1944. align-items: center;
  1945. align-self: stretch;
  1946. flex: 1 0 0;
  1947.  
  1948. border-radius: 8px;
  1949. border: 2px solid rgba(0, 0, 0, 0.20);
  1950. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  1951. background: #007AFF;
  1952.  
  1953. cursor: pointer;
  1954. transition: .1s;
  1955. }
  1956.  
  1957. .SendFeebackBoxSectionSix:hover {
  1958. filter: brightness(0.95);
  1959. }
  1960.  
  1961. .SendFeebackBoxSectionSix:active {
  1962. height: 52px;
  1963.  
  1964. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  1965.  
  1966. filter: brightness(0.9);
  1967. margin-top: 2px;
  1968. }
  1969.  
  1970. .SendFeebackBoxSectionSixIconOneBox {
  1971. display: flex;
  1972. width: 48px;
  1973. height: 48px;
  1974. justify-content: center;
  1975. align-items: center;
  1976. }
  1977.  
  1978. .SendFeebackBoxSectionSixIconOne {
  1979. width: 20px;
  1980. height: 20px;
  1981. flex-shrink: 0;
  1982.  
  1983. border-radius: 20px;
  1984. border: 4px solid rgb(241, 247, 251, 0.40);
  1985. background: rgb(241, 247, 251, 0.40);
  1986. }
  1987.  
  1988. .SendFeebackBoxSectionSixTextOne {
  1989. flex: 1 0 0;
  1990.  
  1991. color: rgb(241, 247, 251);
  1992. font-size: 16px;
  1993. font-style: normal;
  1994. font-weight: 700;
  1995. line-height: normal;
  1996.  
  1997. user-select: none; // chrome and Opera
  1998. -moz-user-select: none; // Firefox
  1999. -webkit-text-select: none; // IOS Safari
  2000. -webkit-user-select: none; // Safari
  2001. }
  2002.  
  2003. .SendFeebackBoxSectionSixIconTwoBox {
  2004. display: flex;
  2005. width: 48px;
  2006. height: 48px;
  2007. justify-content: center;
  2008. align-items: center;
  2009. }
  2010.  
  2011. .SendFeebackBoxSectionSixIconTwo {
  2012. display: flex;
  2013. width: 16px;
  2014. height: 16px;
  2015. flex-direction: column;
  2016. justify-content: center;
  2017. align-items: center;
  2018.  
  2019. fill: rgb(241, 247, 251);
  2020. text-align: center;
  2021. line-height: normal;
  2022. }
  2023.  
  2024. .SendFeebackBoxSectionSeven {
  2025. // height: 48px;
  2026. height: 56px;
  2027. align-self: stretch;
  2028.  
  2029. border-radius: 8px;
  2030.  
  2031. position: relative;
  2032.  
  2033. cursor: not-allowed !important;
  2034. }
  2035.  
  2036. .SendFeebackBoxSectionSevenBoxOne {
  2037. flex-shrink: 0;
  2038. display: flex;
  2039. gap: 32px;
  2040. align-items: center;
  2041.  
  2042. height: 54px;
  2043. /* set the height */
  2044. overflow: hidden;
  2045. /* clip any overflowing content */
  2046. border-radius: 8px;
  2047.  
  2048. pointer-events: none;
  2049. }
  2050.  
  2051. .SendFeebackBoxSectionSevenBoxOneBoxOne {
  2052. width: 16px;
  2053. height: 100px;
  2054. transform: rotate(45deg);
  2055. flex-shrink: 0;
  2056.  
  2057. background: rgb(var(--color-eel), 0.1);
  2058. }
  2059.  
  2060. .SendFeebackBoxSectionSevenBoxTwo {
  2061. display: flex;
  2062. height: 54px;
  2063. align-items: center;
  2064. align-self: stretch;
  2065. flex: 1 0 0;
  2066.  
  2067. position: absolute;
  2068. width: 100%;
  2069.  
  2070. border-radius: 8px;
  2071. border: 2px solid rgb(var(--color-swan));
  2072. border-bottom: 4px solid rgb(var(--color-swan));
  2073. background: rgb(var(--color-snow));
  2074. // cursor: pointer;
  2075. transition: .1s;
  2076. }
  2077.  
  2078. .SendFeebackBoxSectionSevenBoxTwo:hover {
  2079. filter: brightness(0.95);
  2080. }
  2081.  
  2082. .SendFeebackBoxSectionSevenBoxTwo:active {
  2083. border-bottom: 4px solid rgb(var(--color-swan));
  2084. filter: brightness(0.95);
  2085. }
  2086.  
  2087. .SendFeebackBoxSectionSevenBoxTwoIconOneBox {
  2088. display: flex;
  2089. width: 48px;
  2090. height: 48px;
  2091. justify-content: center;
  2092. align-items: center;
  2093. }
  2094.  
  2095. .SendFeebackBoxSectionSevenBoxTwoIconOne {
  2096. width: 20px;
  2097. height: 20px;
  2098. flex-shrink: 0;
  2099.  
  2100. border-radius: 20px;
  2101. border: 4px solid rgb(var(--color-swan), 0.4);
  2102. background: rgb(var(--color-swan), 0.2);
  2103. }
  2104.  
  2105. .SendFeebackBoxSectionSevenBoxTwoTextOne {
  2106. flex: 1 0 0;
  2107.  
  2108. color: rgb(var(--color-swan));
  2109. font-size: 16px;
  2110. font-style: normal;
  2111. font-weight: 700;
  2112. line-height: normal;
  2113.  
  2114. margin-top: 0px;
  2115. margin-bottom: 0px;
  2116.  
  2117. user-select: none; // chrome and Opera
  2118. -moz-user-select: none; // Firefox
  2119. -webkit-text-select: none; // IOS Safari
  2120. -webkit-user-select: none; // Safari
  2121. }
  2122.  
  2123. .SendFeebackBoxSectionSevenBoxTwoIconTwoBox {
  2124. display: flex;
  2125. width: 48px;
  2126. height: 48px;
  2127. justify-content: center;
  2128. align-items: center;
  2129. }
  2130.  
  2131. .SendFeebackBoxSectionSevenBoxTwoIconTwo {
  2132. display: flex;
  2133. width: 16px;
  2134. height: 16px;
  2135. flex-direction: column;
  2136. justify-content: center;
  2137. align-items: center;
  2138. text-align: center;
  2139. line-height: normal;
  2140.  
  2141. fill: rgb(var(--color-swan));
  2142. }
  2143.  
  2144. .SendFeedbackBoxSectionEight {
  2145. display: flex;
  2146. justify-content: center;
  2147. align-items: center;
  2148. gap: 8px;
  2149. align-self: stretch;
  2150. }
  2151.  
  2152. .SendFeebackBoxSectionEightSendButton {
  2153. display: flex;
  2154. height: 54px;
  2155. width: 100%;
  2156. justify-content: center;
  2157. align-items: center;
  2158. gap: 10px;
  2159. align-self: stretch;
  2160.  
  2161. border-radius: 8px;
  2162. border: 2px solid #0062CC;
  2163. border-bottom: 4px solid #0062CC;
  2164. background: #007AFF;
  2165.  
  2166. color: #FFF;
  2167. text-align: center;
  2168. font-size: 16px;
  2169. font-style: normal;
  2170. font-weight: 700;
  2171. line-height: normal;
  2172.  
  2173. cursor: pointer;
  2174. transition: .1s;
  2175.  
  2176. padding: 0px;
  2177. }
  2178.  
  2179. .SendFeebackBoxSectionEightSendButton:hover {
  2180. filter: brightness(0.95);
  2181. }
  2182.  
  2183. .SendFeebackBoxSectionEightSendButton:active {
  2184. height: 52px;
  2185. border-bottom: 2px solid #0062CC;
  2186. margin-top: 2px;
  2187.  
  2188. filter: brightness(0.9);
  2189. }
  2190.  
  2191. .SendFeebackBoxSectionEightEmailButton {
  2192. display: flex;
  2193. height: 54px;
  2194. width: 100%;
  2195. justify-content: center;
  2196. align-items: center;
  2197. gap: 10px;
  2198. align-self: stretch;
  2199.  
  2200. border-radius: 8px;
  2201. border: 2px solid rgb(var(--color-swan));
  2202. border-bottom: 4px solid rgb(var(--color-swan));
  2203. background: rgb(var(--color-snow));
  2204.  
  2205. color: rgb(var(--color-eel));
  2206. text-align: center;
  2207. font-size: 16px;
  2208. font-style: normal;
  2209. font-weight: 700;
  2210. line-height: normal;
  2211.  
  2212. cursor: pointer;
  2213. transition: .1s;
  2214.  
  2215. text-decoration: none;
  2216. }
  2217.  
  2218. .SendFeebackBoxSectionEightEmailButton:hover {
  2219. filter: brightness(0.95);
  2220. }
  2221.  
  2222. .SendFeebackBoxSectionEightEmailButton:active {
  2223. height: 52px;
  2224.  
  2225. border-bottom: 2px solid rgb(var(--color-swan));
  2226.  
  2227. margin-top: 2px;
  2228. filter: brightness(0.9);
  2229. }
  2230.  
  2231. .SendFeebackBoxSectionEightTextOne {
  2232. display: flex;
  2233. flex-direction: column;
  2234. justify-content: center;
  2235. flex: 1 0 0;
  2236. align-self: stretch;
  2237.  
  2238. color: #FFF;
  2239. text-align: center;
  2240. font-size: 16px;
  2241. font-style: normal;
  2242. font-weight: 700;
  2243. line-height: normal;
  2244.  
  2245. user-select: none; // chrome and Opera
  2246. -moz-user-select: none; // Firefox
  2247. -webkit-text-select: none; // IOS Safari
  2248. -webkit-user-select: none; // Safari
  2249. }
  2250. `;
  2251.  
  2252. let randomValue;
  2253.  
  2254. function setRandomValue() {
  2255. if (Boolean(localStorage.getItem("RandomValue")) === false) {
  2256. randomValue = Math.floor(Math.random() * 1000000); // Generates a random number between 0 and 999999
  2257. localStorage.setItem("RandomValue", String(randomValue));
  2258. console.log("Generated ID: ", randomValue); // This is to show you the generated ID, you can remove it later
  2259. } else {
  2260. randomValue = localStorage.getItem("RandomValue");
  2261. }
  2262. }
  2263.  
  2264. setRandomValue();
  2265.  
  2266.  
  2267. let injectedSendFeedBackBoxElement = null;
  2268. let injectedSendFeedBackBoxStyle = null;
  2269.  
  2270. let isSendFeebackBoxSectionEightSendButtonEnabled = false;
  2271.  
  2272. let SendFeedbackTextAreaValue;
  2273. let idktype = 'Bug Report';
  2274. let sendFeedbackStatus = 'none';
  2275.  
  2276. function injectSendFeedBackBox() {
  2277. //console.log('injectSendFeedBackBox called');
  2278. if (isSendFeedbackButtonPressed === true) {
  2279. // Inject the content if it's not already injected
  2280. if (!injectedSendFeedBackBoxElement) {
  2281. // Creating a container for the overlay
  2282. injectedSendFeedBackBoxElement = document.createElement('div');
  2283. injectedSendFeedBackBoxElement.innerHTML = SendFeedbackBoxHTML;
  2284. document.body.appendChild(injectedSendFeedBackBoxElement);
  2285.  
  2286. // Creating a style tag for CSS
  2287. injectedSendFeedBackBoxStyle = document.createElement('style');
  2288. injectedSendFeedBackBoxStyle.type = 'text/css';
  2289. injectedSendFeedBackBoxStyle.innerHTML = SendFeedbackBoxCSS;
  2290. document.head.appendChild(injectedSendFeedBackBoxStyle);
  2291.  
  2292. const SendFeedbackCloseButton = document.querySelector('.SendFeebackBoxSectionOneCancelBoxBackground');
  2293. SendFeedbackCloseButton.addEventListener('click', () => {
  2294. isSendFeedbackButtonPressed = false;
  2295. });
  2296. // Get the textarea element
  2297. const TextAreaOneOne = document.getElementById('SendFeebackBoxSectionTwoID');
  2298.  
  2299. // Set the value of the textarea to the variable
  2300.  
  2301.  
  2302. const bugRadio = document.getElementById('SendFeebackTypeButtonOne');
  2303. const suggestionRadio = document.getElementById('SendFeebackTypeButtonTwo');
  2304.  
  2305. // Create a variable to store the value of the selected radio button
  2306.  
  2307. // Add a change event listener to both radio buttons
  2308.  
  2309.  
  2310. bugRadio.addEventListener('mousedown', () => {
  2311. if (idktype === 'Bug Report') {
  2312. bugRadio.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  2313. bugRadio.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  2314. } else {
  2315. bugRadio.style.border = '2px solid rgb(var(--color-swan))';
  2316. bugRadio.style.borderBottom = '2px solid rgb(var(--color-swan))';
  2317. }
  2318. });
  2319.  
  2320. bugRadio.addEventListener('mouseup', () => {
  2321. idktype = 'Bug Report';
  2322. updateDuolingoProSendFeedbackButtons(bugRadio, idktype);
  2323. });
  2324.  
  2325. suggestionRadio.addEventListener('mousedown', () => {
  2326. if (idktype === 'Suggestion') {
  2327. suggestionRadio.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  2328. suggestionRadio.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  2329. } else {
  2330. suggestionRadio.style.border = '2px solid rgb(var(--color-swan))';
  2331. suggestionRadio.style.borderBottom = '2px solid rgb(var(--color-swan))';
  2332. }
  2333. });
  2334.  
  2335. suggestionRadio.addEventListener('mouseup', () => {
  2336. idktype = 'Suggestion';
  2337. updateDuolingoProSendFeedbackButtonsTwo(bugRadio, idktype);
  2338. });
  2339.  
  2340. addEventListener('mouseup', () => {
  2341. updateDuolingoProSendFeedbackButtons(bugRadio, idktype);
  2342. updateDuolingoProSendFeedbackButtonsTwo(suggestionRadio, idktype);
  2343. });
  2344.  
  2345. updateDuolingoProSendFeedbackButtons(bugRadio, idktype);
  2346. updateDuolingoProSendFeedbackButtonsTwo(suggestionRadio, idktype);
  2347.  
  2348.  
  2349.  
  2350. const SendFeebackBoxSectionTwo = document.querySelector('.SendFeebackBoxSectionTwo');
  2351.  
  2352. const SendFeebackBoxSectionEightSendButton = document.querySelector('.SendFeebackBoxSectionEightSendButton');
  2353. SendFeebackBoxSectionEightSendButton.addEventListener('click', () => {
  2354. if (isSendFeebackBoxSectionEightSendButtonEnabled) {
  2355. SendFeedbackTextAreaValue = TextAreaOneOne.value;
  2356. sendFeedbackNew(SendFeedbackTextAreaValue, idktype);
  2357.  
  2358. sendFeedbackStatus = 'trying';
  2359.  
  2360. function checkFlag() {
  2361. if (sendFeedbackStatus === 'trying') {
  2362. SendFeebackBoxSectionEightSendButton.textContent = 'SENDING';
  2363. setTimeout(function() {
  2364. checkFlag();
  2365. }, 100);
  2366. } else if (sendFeedbackStatus === 'true') {
  2367. SendFeebackBoxSectionEightSendButton.textContent = 'SUCCESSFULLY SENT';
  2368. setTimeout(function() {
  2369. location.reload();
  2370. }, 1000);
  2371. } else if (sendFeedbackStatus === 'error') {
  2372. SendFeebackBoxSectionEightSendButton.textContent = 'ERROR SENDING';
  2373. SendFeebackBoxSectionEightSendButton.style.background = '#FF2D55';
  2374. SendFeebackBoxSectionTwo.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  2375. SendFeebackBoxSectionTwo.style.borderBottom = '4px solid rgba(0, 0, 0, 0.20)';
  2376.  
  2377. setTimeout(function() {
  2378. SendFeebackBoxSectionEightSendButton.textContent = 'TRY AGAIN';
  2379. }, 2000);
  2380.  
  2381. setTimeout(function() {
  2382. SendFeebackBoxSectionEightSendButton.textContent = 'SEND';
  2383. SendFeebackBoxSectionEightSendButton.style.background = '';
  2384. SendFeebackBoxSectionTwo.style.border = '';
  2385. SendFeebackBoxSectionTwo.style.borderBottom = '';
  2386. }, 4000);
  2387.  
  2388. sendFeedbackStatus = 'empty';
  2389. } else if (sendFeedbackStatus === 'empty') {
  2390. setTimeout(function() {
  2391. checkFlag();
  2392. }, 100);
  2393. }
  2394. }
  2395. checkFlag();
  2396.  
  2397. }
  2398. });
  2399.  
  2400.  
  2401. function updateDuolingoProSendFeedbackButtons(element, value) {
  2402. let textElement = element.querySelector('.SendFeebackBoxSectionFourButtonOneTextOne');
  2403. let iconElement = element.querySelector('.SendFeebackBoxSectionFourButtonOneIconOne');
  2404.  
  2405. if (value === 'Bug Report') {
  2406. element.style.background = '#FF2D55';
  2407. element.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  2408. element.style.borderBottom = '4px solid rgba(0, 0, 0, 0.20)';
  2409. textElement.style.color = 'rgb(241, 247, 251)';
  2410. iconElement.style.border = '4px solid rgb(241, 247, 251, 0.40)';
  2411. iconElement.style.background = 'rgb(241, 247, 251, 0.40)';
  2412. } else {
  2413. element.style.background = 'rgb(var(--color-snow))';
  2414. element.style.border = '2px solid rgb(var(--color-swan))';
  2415. element.style.borderBottom = '4px solid rgb(var(--color-swan))';
  2416. textElement.style.color = 'rgb(var(--color-eel), 0.4)';
  2417. iconElement.style.border = '4px solid rgb(var(--color-swan))';
  2418. iconElement.style.background = 'rgb(var(--color-swan), 0.4)';
  2419. }
  2420.  
  2421. }
  2422.  
  2423. function updateDuolingoProSendFeedbackButtonsTwo(element, value) {
  2424. let textElement = element.querySelector('.SendFeebackBoxSectionFourButtonOneTextOne');
  2425. let iconElement = element.querySelector('.SendFeebackBoxSectionFourButtonOneIconOne');
  2426.  
  2427. if (value === 'Suggestion') {
  2428. element.style.background = '#34C759';
  2429. element.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  2430. element.style.borderBottom = '4px solid rgba(0, 0, 0, 0.20)';
  2431. textElement.style.color = 'rgb(241, 247, 251)';
  2432. iconElement.style.border = '4px solid rgb(241, 247, 251, 0.40)';
  2433. iconElement.style.background = 'rgb(241, 247, 251, 0.40)';
  2434. } else {
  2435. element.style.background = 'rgb(var(--color-snow))';
  2436. element.style.border = '2px solid rgb(var(--color-swan))';
  2437. element.style.borderBottom = '4px solid rgb(var(--color-swan))';
  2438. textElement.style.color = 'rgb(var(--color-eel), 0.4)';
  2439. iconElement.style.border = '4px solid rgb(var(--color-swan))';
  2440. iconElement.style.background = 'rgb(var(--color-swan), 0.4)';
  2441. }
  2442.  
  2443. }
  2444.  
  2445.  
  2446. }
  2447. } else {
  2448. // Remove the content if it was previously injected
  2449. if (injectedSendFeedBackBoxElement) {
  2450. document.body.removeChild(injectedSendFeedBackBoxElement);
  2451. document.head.removeChild(injectedSendFeedBackBoxStyle);
  2452. injectedSendFeedBackBoxElement = null;
  2453. injectedSendFeedBackBoxStyle = null;
  2454. }
  2455. }
  2456. }
  2457.  
  2458. setInterval(injectSendFeedBackBox, 100);
  2459.  
  2460. function SendFeedbackTextAreaStuff() {
  2461. if (isSendFeedbackButtonPressed === true) {
  2462. try {
  2463. const SendFeebackBoxSectionEightSendButton = document.querySelector('.SendFeebackBoxSectionEightSendButton');
  2464.  
  2465. const SendFeebackBoxSectionTwo = document.querySelector('.SendFeebackBoxSectionTwo');
  2466.  
  2467. function disableHoverOne() {
  2468. SendFeebackBoxSectionEightSendButton.style.marginTop = '';
  2469. SendFeebackBoxSectionEightSendButton.style.height = '';
  2470.  
  2471. SendFeebackBoxSectionEightSendButton.style.border = '';
  2472. SendFeebackBoxSectionEightSendButton.style.borderBottom = '';
  2473. }
  2474.  
  2475. function enableHoverOne() {
  2476. SendFeebackBoxSectionEightSendButton.style.marginTop = '2px';
  2477. SendFeebackBoxSectionEightSendButton.style.height = '52px';
  2478.  
  2479. SendFeebackBoxSectionEightSendButton.style.border = '2px solid rgb(var(--color-eel), 0.2)';
  2480. SendFeebackBoxSectionEightSendButton.style.borderBottom = '2px solid rgb(var(--color-eel), 0.2)';
  2481. }
  2482.  
  2483. if (SendFeebackBoxSectionTwo.value.trim().length > 16) {
  2484. SendFeebackBoxSectionEightSendButton.style.opacity = '100%';
  2485. SendFeebackBoxSectionEightSendButton.style.cursor = 'pointer';
  2486.  
  2487. isSendFeebackBoxSectionEightSendButtonEnabled = true;
  2488. } else {
  2489. SendFeebackBoxSectionEightSendButton.style.opacity = '0.5';
  2490. SendFeebackBoxSectionEightSendButton.style.cursor = 'not-allowed';
  2491.  
  2492. isSendFeebackBoxSectionEightSendButtonEnabled = false;
  2493. }
  2494.  
  2495. if (isSendFeebackBoxSectionEightSendButtonEnabled) {
  2496. disableHoverOne();
  2497. } else {
  2498. enableHoverOne();
  2499. }
  2500. } catch (error) {
  2501. }
  2502. }
  2503. }
  2504.  
  2505. setInterval(SendFeedbackTextAreaStuff, 100);
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512. const WhatsNewBoxHTML = `
  2513. <div class="WhatsNewBoxOneShadow">
  2514. <div class="WhatsNewBoxOneBackground">
  2515. <div class="WhatsNewBoxOneSectionOne">
  2516. <p class="WhatsNewBoxOneSectionOneTextOne">Whats New</p>
  2517. <div class="WhatsNewBoxOneSectionOneBoxOne">
  2518. <p class="WhatsNewBoxOneSectionOneBoxOneTextOne">2.0 BETA 6</p>
  2519. </div>
  2520. </div>
  2521. <div class="WhatsNewBoxOneSectionTwo">
  2522. <img src="https://framerusercontent.com/images/oaXxGJyRWwPc6cFDUM3fPxlDI.png" class="WhatsNewBoxOneSectionTwoImageOne">
  2523. </div>
  2524. <div class="WhatsNewBoxOneSectionThree">
  2525. <p class="WhatsNewBoxOneSectionThreeTextOne">Brand New Backend</p>
  2526. <p class="WhatsNewBoxOneSectionThreeTextTwo">The backend for AutoSolver has been completely rewritten, providing more stability.</p>
  2527. </div>
  2528. <div class="WhatsNewBoxOneSectionFour">
  2529. <p class="WhatsNewBoxOneSectionFourTextOne">NEXT</p>
  2530. </div>
  2531. </div>
  2532. </div>
  2533. `;
  2534.  
  2535. const WhatsNewBoxCSS = `
  2536. .WhatsNewBoxOneShadow {
  2537. position: fixed;
  2538. display: flex;
  2539. width: 100%;
  2540. height: 100vh;
  2541. justify-content: center;
  2542. align-items: center;
  2543. flex-shrink: 0;
  2544.  
  2545. background: rgba(0, 0, 0, 0.5);
  2546. backdrop-filter: blur(8px);
  2547.  
  2548. z-index: 2;
  2549. top: 0px;
  2550. bottom: 0px;
  2551. right: 0px;
  2552. left: 0px;
  2553. }
  2554.  
  2555. .WhatsNewBoxOneBackground {
  2556. display: flex;
  2557. padding: 16px;
  2558. flex-direction: column;
  2559. justify-content: center;
  2560. align-items: center;
  2561. gap: 8px;
  2562.  
  2563. border-radius: 16px;
  2564. border: 2px solid rgba(0, 0, 0, 0.10);
  2565. background: #FFF;
  2566.  
  2567. width: 400px;
  2568. }
  2569.  
  2570. .WhatsNewBoxOneSectionOne {
  2571. display: flex;
  2572. justify-content: space-between;
  2573. align-items: center;
  2574. align-self: stretch;
  2575. }
  2576.  
  2577. .WhatsNewBoxOneSectionOneTextOne {
  2578. color: #000;
  2579. font-size: 24px;
  2580. font-style: normal;
  2581. font-weight: 700;
  2582. line-height: normal;
  2583.  
  2584. cursor: default;
  2585. margin: 0px;
  2586. }
  2587.  
  2588. .WhatsNewBoxOneSectionOneBoxOne {
  2589. display: flex;
  2590. padding: 8px;
  2591. flex-direction: column;
  2592. justify-content: center;
  2593. align-items: center;
  2594.  
  2595. border-radius: 8px;
  2596. border: 2px solid rgba(0, 0, 0, 0.20);
  2597. background: #FF2D55;
  2598. }
  2599.  
  2600. .WhatsNewBoxOneSectionOneBoxOneTextOne {
  2601. color: #FFF;
  2602. font-size: 16px;
  2603. font-style: normal;
  2604. font-weight: 700;
  2605. line-height: normal;
  2606.  
  2607. cursor: default;
  2608. margin: 0px;
  2609. }
  2610.  
  2611. .WhatsNewBoxOneSectionTwo {
  2612. display: flex;
  2613. height: 300px;
  2614. flex-direction: column;
  2615. justify-content: center;
  2616. align-items: center;
  2617. align-self: stretch;
  2618. padding: 0px;
  2619.  
  2620. border-radius: 8px;
  2621. border: 2px solid rgba(0, 0, 0, 0.20);
  2622. background: rgba(0, 0, 0, 0.05);
  2623. }
  2624.  
  2625. .WhatsNewBoxOneSectionTwoImageOne {
  2626. width: 100%;
  2627. border-radius: 8px;
  2628. }
  2629.  
  2630. .WhatsNewBoxOneSectionThree {
  2631. display: flex;
  2632. padding-bottom: 0px;
  2633. flex-direction: column;
  2634. align-items: flex-start;
  2635. gap: 4px;
  2636. align-self: stretch;
  2637.  
  2638. margin-top: 4px;
  2639. margin-bottom: 8px;
  2640. }
  2641.  
  2642. .WhatsNewBoxOneSectionThreeTextOne {
  2643. align-self: stretch;
  2644.  
  2645. color: #000;
  2646. font-size: 20px;
  2647. font-style: normal;
  2648. font-weight: 700;
  2649. line-height: normal;
  2650.  
  2651. cursor: default;
  2652. margin: 0px;
  2653. }
  2654.  
  2655. .WhatsNewBoxOneSectionThreeTextTwo {
  2656. align-self: stretch;
  2657.  
  2658. color: rgba(0, 0, 0, 0.50);
  2659. font-size: 16px;
  2660. font-style: normal;
  2661. font-weight: 700;
  2662. line-height: normal;
  2663.  
  2664. cursor: default;
  2665. margin: 0px;
  2666. }
  2667.  
  2668. .WhatsNewBoxOneSectionFour {
  2669. display: flex;
  2670. height: 48px;
  2671. justify-content: center;
  2672. align-items: center;
  2673. gap: 8px;
  2674. align-self: stretch;
  2675.  
  2676. border-radius: 8px;
  2677. border: 2px solid rgba(0, 0, 0, 0.20);
  2678. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  2679. background: #007AFF;
  2680.  
  2681. cursor: pointer;
  2682. transition: .1s;
  2683. }
  2684.  
  2685. .WhatsNewBoxOneSectionFour:hover {
  2686. filter: brightness(0.95);
  2687. }
  2688.  
  2689. .WhatsNewBoxOneSectionFour:active {
  2690. filter: brightness(0.9);
  2691. margin-top: 2px;
  2692. height: 46px;
  2693.  
  2694. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  2695.  
  2696. filter: brightness(0.9);
  2697. }
  2698.  
  2699. .WhatsNewBoxOneSectionFourTextOne {
  2700. color: #FFF;
  2701. text-align: center;
  2702. font-size: 16px;
  2703. font-style: normal;
  2704. font-weight: 700;
  2705. line-height: normal;
  2706.  
  2707. margin: 0px;
  2708.  
  2709. user-select: none; // chrome and Opera
  2710. -moz-user-select: none; // Firefox
  2711. -webkit-text-select: none; // IOS Safari
  2712. -webkit-user-select: none; // Safari
  2713. }
  2714. `;
  2715.  
  2716. let injectedWhatsNewBoxElement = null;
  2717. let injectedWhatsNewBoxStyle = null;
  2718.  
  2719. function injectWhatsNewBox() {
  2720. //console.log('injectWhatsNewBox called');
  2721. if (wasWhatsNewInTwoPointZeroBetaSixFinished === false) {
  2722.  
  2723. if (window.location.pathname === '/learn') {
  2724. // Inject the content if it's not already injected
  2725. if (!injectedWhatsNewBoxElement) {
  2726. // Creating a container for the overlay
  2727. injectedWhatsNewBoxElement = document.createElement('div');
  2728. injectedWhatsNewBoxElement.innerHTML = WhatsNewBoxHTML;
  2729. document.body.appendChild(injectedWhatsNewBoxElement);
  2730.  
  2731. // Creating a style tag for CSS
  2732. injectedWhatsNewBoxStyle = document.createElement('style');
  2733. injectedWhatsNewBoxStyle.type = 'text/css';
  2734. injectedWhatsNewBoxStyle.innerHTML = WhatsNewBoxCSS;
  2735. document.head.appendChild(injectedWhatsNewBoxStyle);
  2736.  
  2737. const WhatsNewBoxOneSectionFour = document.querySelector('.WhatsNewBoxOneSectionFour');
  2738. modifyWhatsNewBox();
  2739. WhatsNewBoxOneSectionFour.addEventListener('click', () => {
  2740. whatsNewInBetaStage++;
  2741. console.log('something');
  2742. modifyWhatsNewBox();
  2743. });
  2744. }
  2745. }
  2746. } else {
  2747. // Remove the content if it was previously injected
  2748. if (injectedWhatsNewBoxElement) {
  2749. document.body.removeChild(injectedWhatsNewBoxElement);
  2750. document.head.removeChild(injectedWhatsNewBoxStyle);
  2751. injectedWhatsNewBoxElement = null;
  2752. injectedWhatsNewBoxStyle = null;
  2753. }
  2754. }
  2755. }
  2756.  
  2757. setInterval(injectWhatsNewBox, 100);
  2758.  
  2759. function modifyWhatsNewBox() {
  2760. const WhatsNewBoxOneSectionThreeTextOne = document.querySelector('.WhatsNewBoxOneSectionThreeTextOne');
  2761. const WhatsNewBoxOneSectionThreeTextTwo = document.querySelector('.WhatsNewBoxOneSectionThreeTextTwo');
  2762. const WhatsNewBoxOneSectionFourTextOne = document.querySelector('.WhatsNewBoxOneSectionFourTextOne');
  2763. const WhatsNewBoxOneSectionTwoImageOneURL = document.querySelector('img.WhatsNewBoxOneSectionTwoImageOne');
  2764.  
  2765. if (whatsNewInBetaStage === 0) {
  2766. WhatsNewBoxOneSectionThreeTextOne.textContent = 'New and Improved Backend';
  2767. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'The backend for AutoSolver has been completely rewritten, providing more stability and less bugs.';
  2768. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/oaXxGJyRWwPc6cFDUM3fPxlDI.png';
  2769. WhatsNewBoxOneSectionFourTextOne.textContent = 'NEXT';
  2770. } else if (whatsNewInBetaStage === 0) {
  2771. WhatsNewBoxOneSectionThreeTextOne.textContent = 'Duolingo Pro Website';
  2772. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'The issues & roadmap page provides a better visual of what issues currently exist, when they’re scheduled to be fixed and what features are coming soon.';
  2773. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/q30YeZga0tb4ndWMVmFEjDiTww.png';
  2774. WhatsNewBoxOneSectionFourTextOne.textContent = 'NEXT';
  2775. } else if (whatsNewInBetaStage === 1) {
  2776. WhatsNewBoxOneSectionThreeTextOne.textContent = 'Settings Tab for Duolingo Pro';
  2777. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'With the new settings tab, you can now enable new features or disable them to your need.';
  2778. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/itNtqAZjyPuh8dVnLItNGqjA2I.png';
  2779. WhatsNewBoxOneSectionFourTextOne.textContent = 'NEXT';
  2780. } else if (whatsNewInBetaStage === 2) {
  2781. WhatsNewBoxOneSectionThreeTextOne.textContent = 'ProBlock by Duolingo Pro';
  2782. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'ProBlock removes ads that pop-up on the main Duolingo tabs like Learn, Practice, and Shop.';
  2783. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/VFa03QdeAxhSUggKUbsQRtiYYag.png';
  2784. WhatsNewBoxOneSectionFourTextOne.textContent = 'NEXT';
  2785. } else if (whatsNewInBetaStage === 3) {
  2786. WhatsNewBoxOneSectionThreeTextOne.textContent = 'Auto-Repeat Lessons';
  2787. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'Auto-Repeat Lesson Mode enables AutoSolver to only do a set lesson and repeat it. This mode improves chances of AutoSolver not getting stuck. We recommend using this mode with the Spanish/French/German course from English IF your main goal is to gain the most XP autonomously.';
  2788. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/fHj0L8tJB3xiZGMZDMju7Youjmg.png';
  2789. WhatsNewBoxOneSectionFourTextOne.textContent = 'NEXT';
  2790. } else if (whatsNewInBetaStage === 4) {
  2791. WhatsNewBoxOneSectionThreeTextOne.textContent = 'Refreshed Send Feedback';
  2792. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'The refreshed Send Feedback box makes it even more easier and faster to send feedback. The refreshed design makes it more fun while the all-new backend sends faster with less errors.';
  2793. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/5TfQixlud5chFxBxRfIaUT98KRk.png';
  2794. WhatsNewBoxOneSectionFourTextOne.textContent = 'NEXT';
  2795. } else if (whatsNewInBetaStage === 5) {
  2796. WhatsNewBoxOneSectionThreeTextOne.textContent = 'Humane Solving Mode';
  2797. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'Humane Solving mode solves each question step by step, making activity look less suspicious on Duolingo lesson logs, reducing the slim chances of being banned or temporarily deactivated to even less.';
  2798. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/RhmJpQO6B9QXULLIQgZJeUPiroY.png';
  2799. WhatsNewBoxOneSectionFourTextOne.textContent = 'NEXT';
  2800. } else if (whatsNewInBetaStage === 6) {
  2801. WhatsNewBoxOneSectionThreeTextOne.textContent = 'TurboSolve';
  2802. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'TurboSolve can solve question up to 5 times faster, reducing the time spent on lessons greatly while getting more work done.';
  2803. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/RhmJpQO6B9QXULLIQgZJeUPiroY.png';
  2804. WhatsNewBoxOneSectionFourTextOne.textContent = 'NEXT';
  2805. } else if (whatsNewInBetaStage === 7) {
  2806. WhatsNewBoxOneSectionThreeTextOne.textContent = 'ProAccount (planned)';
  2807. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'ProAccount is a new planned feature that will allow cross-device syncing and make one-on-one support possible in the future. BETA 6 is laying the foundation for these new features.';
  2808. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/e0zC1jjKLy7Ucvx8avK99oo52GE.png';
  2809. WhatsNewBoxOneSectionFourTextOne.textContent = 'CLOSE';
  2810. } else if (whatsNewInBetaStage === 0) {
  2811. WhatsNewBoxOneSectionThreeTextOne.textContent = 'ProServer, the next era';
  2812. WhatsNewBoxOneSectionThreeTextTwo.textContent = 'ProServer will be the next ginormous step Duolingo Pro will take. No more having to log in to keep your steak going, or stay in the leaderboard. ProServer by Duolingo Pro will make sure to do those things without any input needed every day.';
  2813. WhatsNewBoxOneSectionTwoImageOneURL.src = 'https://framerusercontent.com/images/e0zC1jjKLy7Ucvx8avK99oo52GE.png';
  2814. WhatsNewBoxOneSectionFourTextOne.textContent = 'CLOSE';
  2815. } else {
  2816. wasWhatsNewInTwoPointZeroBetaSixFinished = true;
  2817. localStorage.setItem('wasWhatsNewInTwoPointZeroBetaSixFinished', wasWhatsNewInTwoPointZeroBetaSixFinished);
  2818. }
  2819.  
  2820. }
  2821.  
  2822.  
  2823. const DuolingoProSettingsBoxHTML = `
  2824. <div class="DuolingoProSettingsBoxShadow">
  2825. <div class="DuolingoProSettingsBoxBackground">
  2826. <div class="DuolingoProSettingsBoxLayers">
  2827. <div class="DuolingoProSettingsBoxSectionOne">
  2828. <p class="DuolingoProSettingsBoxSectionOneTextOne">Settings (scrollable)</p>
  2829. <div class="DuolingoProSettingsBoxSectionOneBoxOne">
  2830. <p class="DuolingoProSettingsBoxSectionOneBoxOneTextOne">2.0 BETA 6</p>
  2831. </div>
  2832. </div>
  2833. <div class="DuolingoProSettingsBoxSectionTwo">
  2834. <div class="DuolingoProSettingsBoxSectionTwoBoxOne">
  2835. <div class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOne">
  2836. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextThree">RECOMMENDED</p>
  2837. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne">Show AutoSolver Box</p>
  2838. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo">AutoSolver Box makes it easier to binge solve questions automatically.</p>
  2839. </div>
  2840. <div class="DuolingoProSettingsBoxToggleTypeOne" id="DuolingoProSettingsBoxToggleOneID">
  2841. <p class="DuolingoProSettingsBoxToggleTypeOneTextOne">ON</p>
  2842. </div>
  2843. </div>
  2844. <div class="DuolingoProSettingsBoxSectionTwoBoxOne">
  2845. <div class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOne">
  2846. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne">Show Practice Only Mode for AutoSolver Box</p>
  2847. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo">NOTE: THIS MODE CURRENTY DOESN'T WORK. KEEP OFF UNLESS YOU WANT TO TRY IT OUT. Practice Mode enables AutoSolver to only do practices and repeat them.</p>
  2848. </div>
  2849. <div class="DuolingoProSettingsBoxToggleTypeOne" id="DuolingoProSettingsBoxToggleTwoID">
  2850. <p class="DuolingoProSettingsBoxToggleTypeOneTextOne">OFF</p>
  2851. </div>
  2852. </div>
  2853. <div class="DuolingoProSettingsBoxSectionTwoBoxOne">
  2854. <div class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOne">
  2855. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextThree">RECOMMENDED</p>
  2856. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne">Show Repeat Lesson Mode for AutoSolver Box</p>
  2857. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo">Repeat Lesson Mode enables AutoSolver to only do a set lesson and repeat it. This mode improves chances of AutoSolver NOT getting stuck on an unsupported question type. We recommend using this mode with the Spanish/French/German course from English IF your main goal is to gain the most XP autonomously.</p>
  2858. </div>
  2859. <div class="DuolingoProSettingsBoxToggleTypeOne" id="DuolingoProSettingsBoxToggleThreeID">
  2860. <p class="DuolingoProSettingsBoxToggleTypeOneTextOne">NOT SET</p>
  2861. </div>
  2862. </div>
  2863. <div class="DuolingoProSettingsBoxSectionTwoBoxOne">
  2864. <div class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOne">
  2865. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne">Low Performance Mode</p>
  2866. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo">In low performance mode, Duolingo Pro works slower while using slightly less power. NOTE: This mode doesn't do anything *yet*.</p>
  2867. </div>
  2868. <div class="DuolingoProSettingsBoxToggleTypeOne" id="DuolingoProSettingsBoxToggleFourID">
  2869. <p class="DuolingoProSettingsBoxToggleTypeOneTextOne">OFF</p>
  2870. </div>
  2871. </div>
  2872. <div class="DuolingoProSettingsBoxSectionTwoBoxOne">
  2873. <div class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOne">
  2874. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextThree">RECOMMENDED</p>
  2875. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne">ProBlock Ads by Duolingo Pro</p>
  2876. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo">ProBlock removes ads that pop-up on the main Duolingo tabs like Learn, Practice, and Shop.</p>
  2877. </div>
  2878. <div class="DuolingoProSettingsBoxToggleTypeOne" id="DuolingoProSettingsBoxToggleFiveID">
  2879. <p class="DuolingoProSettingsBoxToggleTypeOneTextOne">ON</p>
  2880. </div>
  2881. </div>
  2882. <div class="DuolingoProSettingsBoxSectionTwoBoxOne">
  2883. <div class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOne">
  2884. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextFour">EXPERIMENTAL</p>
  2885. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne">TurboSolve Mode</p>
  2886. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo">TurboSolve, thanks to <a href="https://github.com/SicariusBlack" style="color: #007AFF; font-size: 14px; font-style: normal; font-weight: 700; line-height: normal;">SicariusBlack</a>, improves AutoSolve and Solve All speeds by up to 5 times. This is an experimental feature.</p>
  2887. </div>
  2888. <div class="DuolingoProSettingsBoxToggleTypeOne" id="DuolingoProSettingsBoxToggleSixID">
  2889. <p class="DuolingoProSettingsBoxToggleTypeOneTextOne">ON</p>
  2890. </div>
  2891. </div>
  2892. <div class="DuolingoProSettingsBoxSectionTwoBoxOne">
  2893. <div class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOne">
  2894. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextFour">NEW</p>
  2895. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne">Humane Solving Mode</p>
  2896. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo">Humane Solving mode, thanks to <a href="https://github.com/SicariusBlack" style="color: #007AFF; font-size: 14px; font-style: normal; font-weight: 700; line-height: normal;">SicariusBlack</a>, solves every question step by step, greatly reducing the slim chances of being caught and banned.</p>
  2897. </div>
  2898. <div class="DuolingoProSettingsBoxToggleTypeOne" id="DuolingoProSettingsBoxToggleSevenID">
  2899. <p class="DuolingoProSettingsBoxToggleTypeOneTextOne">ON</p>
  2900. </div>
  2901. </div>
  2902. <div class="DuolingoProSettingsBoxSectionTwoBoxOne">
  2903. <div class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOne">
  2904. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne">Contributors</p>
  2905. <p class="DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo"><a href="https://github.com/SicariusBlack" target="_blank" rel="noopener noreferrer" style="color: #007AFF; text-decoration-line: none;">SicariusBlack</a></p>
  2906. </div>
  2907. </div>
  2908. </div>
  2909. <div class="DuolingoProSettingsBoxSectionThree">
  2910. <div class="DuolingoProSettingsBoxCancelButton">
  2911. <p class="DuolingoProSettingsBoxCancelButtonTextOne">CANCEL</p>
  2912. </div>
  2913. <div class="DuolingoProSettingsBoxSaveButton">
  2914. <p class="DuolingoProSettingsBoxSaveButtonTextOne">SAVE</p>
  2915. </div>
  2916. </div>
  2917. </div>
  2918. </div>
  2919. </div>
  2920. `;
  2921.  
  2922. const DuolingoProSettingsBoxCSS = `
  2923. .DuolingoProSettingsBoxShadow {
  2924. position: fixed;
  2925. display: flex;
  2926. width: 100%;
  2927. height: 100vh;
  2928. justify-content: center;
  2929. align-items: center;
  2930. flex-shrink: 0;
  2931.  
  2932. background: rgba(0, 0, 0, 0.5);
  2933. backdrop-filter: blur(8px);
  2934.  
  2935. z-index: 2;
  2936. top: 0px;
  2937. bottom: 0px;
  2938. right: 0px;
  2939. left: 0px;
  2940. }
  2941.  
  2942. .DuolingoProSettingsBoxBackground {
  2943. display: flex;
  2944.  
  2945. max-height: 80vh;
  2946. width: 80%;
  2947. max-width: 600px;
  2948. min-width: 368px;
  2949. padding-right: 16px;
  2950. padding-left: 16px;
  2951. margin-bottom: 16px;
  2952. overflow-y: visible;
  2953. flex-direction: column;
  2954. justify-content: center;
  2955. align-items: center;
  2956. gap: 8px;
  2957. flex-shrink: 0;
  2958.  
  2959. border-radius: 16px;
  2960. border: 2px solid rgb(var(--color-swan));
  2961. background: rgb(var(--color-snow));
  2962. }
  2963.  
  2964. .DuolingoProSettingsBoxLayers {
  2965. display: flex;
  2966. flex-direction: column;
  2967. align-items: flex-start;
  2968. gap: 8px;
  2969. align-self: stretch;
  2970.  
  2971. overflow-y: auto;
  2972. padding: 16px 0 16px 0;
  2973. margin-right: -16px;
  2974. padding-right: 16px;
  2975. }
  2976.  
  2977. .DuolingoProSettingsBoxSectionOne {
  2978. display: flex;
  2979. height: 36px;
  2980. justify-content: space-between;
  2981. align-items: center;
  2982. align-self: stretch;
  2983. }
  2984.  
  2985. .DuolingoProSettingsBoxSectionOneTextOne {
  2986. color: rgb(var(--color-eel));
  2987. font-size: 24px;
  2988. font-style: normal;
  2989. font-weight: 700;
  2990. line-height: normal;
  2991.  
  2992. margin: 0px;
  2993. cursor: default;
  2994. }
  2995.  
  2996. .DuolingoProSettingsBoxSectionOneBoxOne {
  2997. display: flex;
  2998. width: 98px;
  2999. height: 36px;
  3000. flex-direction: column;
  3001. justify-content: center;
  3002. align-items: center;
  3003.  
  3004. border-radius: 8px;
  3005. border: 2px solid rgba(0, 0, 0, 0.20);
  3006. background: #FF2D55;
  3007. }
  3008.  
  3009. .DuolingoProSettingsBoxSectionOneBoxOneTextOne {
  3010. color: #FFF;
  3011. font-size: 16px;
  3012. font-style: normal;
  3013. font-weight: 700;
  3014. line-height: normal;
  3015.  
  3016. margin: 0px;
  3017. cursor: default;
  3018. }
  3019.  
  3020. .DuolingoProSettingsBoxSectionTwo {
  3021. display: flex;
  3022. padding-bottom: 8px;
  3023. flex-direction: column;
  3024. align-items: flex-start;
  3025. gap: 16px;
  3026. align-self: stretch;
  3027. }
  3028.  
  3029. .DuolingoProSettingsBoxSectionTwoBoxOne {
  3030. display: flex;
  3031. align-items: center;
  3032. gap: 16px;
  3033. align-self: stretch;
  3034. }
  3035.  
  3036. .DuolingoProSettingsBoxSectionTwoBoxOneBoxOne {
  3037. display: flex;
  3038. flex-direction: column;
  3039. align-items: flex-start;
  3040. gap: 4px;
  3041. flex: 1 0 0;
  3042. }
  3043.  
  3044. .DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextOne {
  3045. align-self: stretch;
  3046.  
  3047. color: rgb(var(--color-eel));
  3048. font-size: 16px;
  3049. font-style: normal;
  3050. font-weight: 700;
  3051. line-height: normal;
  3052.  
  3053. margin: 0px;
  3054. cursor: default;
  3055. }
  3056.  
  3057. .DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextTwo {
  3058. align-self: stretch;
  3059.  
  3060. color: rgb(var(--color-hare));
  3061. font-size: 14px;
  3062. font-style: normal;
  3063. font-weight: 700;
  3064. line-height: normal;
  3065.  
  3066. margin: 0px;
  3067. cursor: default;
  3068. }
  3069.  
  3070. .DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextThree {
  3071. align-self: stretch;
  3072.  
  3073. color: #007AFF;
  3074. font-size: 14px;
  3075. font-style: normal;
  3076. font-weight: 700;
  3077. line-height: normal;
  3078.  
  3079. margin: 0px;
  3080. cursor: default;
  3081. }
  3082.  
  3083. .DuolingoProSettingsBoxSectionTwoBoxOneBoxOneTextFour {
  3084. align-self: stretch;
  3085.  
  3086. color: #FF2D55;
  3087. font-size: 14px;
  3088. font-style: normal;
  3089. font-weight: 700;
  3090. line-height: normal;
  3091.  
  3092. margin: 0px;
  3093. cursor: default;
  3094. }
  3095.  
  3096. .DuolingoProSettingsBoxToggleTypeOne {
  3097. display: flex;
  3098. width: 98px;
  3099. height: 48px;
  3100. justify-content: center;
  3101. align-items: center;
  3102. gap: 8px;
  3103.  
  3104. border-radius: 8px;
  3105. border: 2px solid rgba(0, 0, 0, 0.20);
  3106. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  3107. background: #007AFF;
  3108.  
  3109. cursor: pointer;
  3110. transition: .1s;
  3111. }
  3112.  
  3113. .DuolingoProSettingsBoxToggleTypeOne:hover {
  3114. filter: brightness(0.95);
  3115. }
  3116.  
  3117. .DuolingoProSettingsBoxToggleTypeOne:active {
  3118. filter: brightness(0.9);
  3119.  
  3120. margin-top: 2px;
  3121. height: 46px;
  3122. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  3123. }
  3124.  
  3125. .DuolingoProSettingsBoxToggleTypeOneTextOne {
  3126. color: #FFF;
  3127. text-align: center;
  3128. font-size: 16px;
  3129. font-style: normal;
  3130. font-weight: 700;
  3131. line-height: normal;
  3132. margin: 0px;
  3133.  
  3134. user-select: none; // chrome and Opera
  3135. -moz-user-select: none; // Firefox
  3136. -webkit-text-select: none; // IOS Safari
  3137. -webkit-user-select: none; // Safari
  3138. }
  3139.  
  3140. .DuolingoProSettingsBoxSectionThree {
  3141. display: flex;
  3142. align-items: flex-start;
  3143. gap: 8px;
  3144. align-self: stretch;
  3145. }
  3146.  
  3147. .DuolingoProSettingsBoxCancelButton {
  3148. display: flex;
  3149. width: 98px;
  3150. height: 54px;
  3151. justify-content: center;
  3152. align-items: center;
  3153. gap: 8px;
  3154.  
  3155. border-radius: 8px;
  3156. border: 2px solid rgb(var(--color-swan));
  3157. border-bottom: 4px solid rgb(var(--color-swan));
  3158. background: rgb(var(--color-snow));
  3159.  
  3160. cursor: pointer;
  3161. transition: .1s;
  3162. }
  3163.  
  3164. .DuolingoProSettingsBoxCancelButton:hover {
  3165. filter: brightness(0.95);
  3166. }
  3167.  
  3168. .DuolingoProSettingsBoxCancelButton:active {
  3169. filter: brightness(0.9);
  3170.  
  3171. margin-top: 2px;
  3172. height: 52px;
  3173. border-bottom: 2px solid rgb(var(--color-swan));
  3174. }
  3175.  
  3176. .DuolingoProSettingsBoxCancelButtonTextOne {
  3177. color: rgb(var(--color-eel));
  3178. text-align: center;
  3179. font-size: 16px;
  3180. font-style: normal;
  3181. font-weight: 700;
  3182. line-height: normal;
  3183. margin: 0px;
  3184.  
  3185. user-select: none; // chrome and Opera
  3186. -moz-user-select: none; // Firefox
  3187. -webkit-text-select: none; // IOS Safari
  3188. -webkit-user-select: none; // Safari
  3189. }
  3190.  
  3191. .DuolingoProSettingsBoxSaveButton {
  3192. display: flex;
  3193. height: 54px;
  3194. padding: 0px 16px;
  3195. justify-content: center;
  3196. align-items: center;
  3197. gap: 8px;
  3198. flex: 1 0 0;
  3199.  
  3200. border-radius: 8px;
  3201. border: 2px solid rgba(0, 0, 0, 0.20);
  3202. border-bottom: 4px solid rgba(0, 0, 0, 0.20);
  3203. background: #007AFF;
  3204.  
  3205. cursor: pointer;
  3206. transition: .1s;
  3207. }
  3208.  
  3209. .DuolingoProSettingsBoxSaveButton:hover {
  3210. filter: brightness(0.95);
  3211. }
  3212.  
  3213. .DuolingoProSettingsBoxSaveButton:active {
  3214. filter: brightness(0.9);
  3215.  
  3216. margin-top: 2px;
  3217. height: 52px;
  3218. border-bottom: 2px solid rgba(0, 0, 0, 0.20);
  3219. }
  3220.  
  3221. .DuolingoProSettingsBoxSaveButtonTextOne {
  3222. color: #FFF;
  3223. text-align: center;
  3224. font-size: 16px;
  3225. font-style: normal;
  3226. font-weight: 700;
  3227. line-height: normal;
  3228. margin: 0px;
  3229.  
  3230. user-select: none; // chrome and Opera
  3231. -moz-user-select: none; // Firefox
  3232. -webkit-text-select: none; // IOS Safari
  3233. -webkit-user-select: none; // Safari
  3234. }
  3235. `;
  3236.  
  3237. let injectedDuolingoProSettingsBoxElement = null;
  3238. let injectedDuolingoProSettingsBoxStyle = null;
  3239.  
  3240. function injectDuolingoProSettingsBox() {
  3241. //console.log('injectDuolingoProSettingsBox called');
  3242. if (wasDuolingoProSettingsButtonOnePressed === true) {
  3243. // Inject the content if it's not already injected
  3244. if (!injectedDuolingoProSettingsBoxElement) {
  3245. // Creating a container for the overlay
  3246. injectedDuolingoProSettingsBoxElement = document.createElement('div');
  3247. injectedDuolingoProSettingsBoxElement.innerHTML = DuolingoProSettingsBoxHTML;
  3248. document.body.appendChild(injectedDuolingoProSettingsBoxElement);
  3249.  
  3250. // Creating a style tag for CSS
  3251. injectedDuolingoProSettingsBoxStyle = document.createElement('style');
  3252. injectedDuolingoProSettingsBoxStyle.type = 'text/css';
  3253. injectedDuolingoProSettingsBoxStyle.innerHTML = DuolingoProSettingsBoxCSS;
  3254. document.head.appendChild(injectedDuolingoProSettingsBoxStyle);
  3255.  
  3256. const DuolingoProSettingsBoxCancelButton = document.querySelector('.DuolingoProSettingsBoxCancelButton');
  3257. DuolingoProSettingsBoxCancelButton.addEventListener('click', () => {
  3258. wasDuolingoProSettingsButtonOnePressed = false;
  3259.  
  3260. AutoSolverSettingsShowAutoSolverBox = JSON.parse(localStorage.getItem('AutoSolverSettingsShowAutoSolverBox'));
  3261. AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox = JSON.parse(localStorage.getItem('AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox'));
  3262. AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox = JSON.parse(localStorage.getItem('AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox'));
  3263. AutoSolverSettingsLowPerformanceMode = JSON.parse(localStorage.getItem('AutoSolverSettingsLowPerformanceMode'));
  3264. });
  3265.  
  3266. const DuolingoProSettingsBoxSaveButton = document.querySelector('.DuolingoProSettingsBoxSaveButton');
  3267. DuolingoProSettingsBoxSaveButton.addEventListener('click', () => {
  3268.  
  3269. if (JSON.parse(localStorage.getItem('AutoSolverSettingsShowAutoSolverBox')) !== AutoSolverSettingsShowAutoSolverBox) {
  3270. settingsStuff("Duolingo Pro AutoSolver Box", AutoSolverSettingsShowAutoSolverBox ? 'ON' : 'OFF');
  3271. }
  3272.  
  3273. if (JSON.parse(localStorage.getItem('AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox')) !== AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox) {
  3274. settingsStuff("Duolingo Pro Practice Only Mode", AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox ? 'ON' : 'OFF');
  3275. }
  3276.  
  3277. if (JSON.parse(localStorage.getItem('AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox')) !== AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox) {
  3278. settingsStuff("Duolingo Pro Repeat Lesson Mode", AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox ? 'ON' : 'OFF');
  3279. }
  3280.  
  3281. if (JSON.parse(localStorage.getItem('AutoSolverSettingsLowPerformanceMode')) !== AutoSolverSettingsLowPerformanceMode) {
  3282. settingsStuff("Duolingo Pro Low Performance Mode", AutoSolverSettingsLowPerformanceMode ? 'ON' : 'OFF');
  3283. }
  3284.  
  3285. if (JSON.parse(localStorage.getItem('DuolingoProSettingsProBlockMode')) !== DuolingoProSettingsProBlockMode) {
  3286. settingsStuff("Duolingo Pro ProBlock", DuolingoProSettingsProBlockMode ? 'ON' : 'OFF');
  3287. }
  3288.  
  3289. if (JSON.parse(localStorage.getItem('DuolingoProSettingsTurboSolveMode')) !== DuolingoProSettingsTurboSolveMode) {
  3290. settingsStuff("Duolingo Pro TurboSolve Mode", DuolingoProSettingsTurboSolveMode ? 'ON' : 'OFF');
  3291. }
  3292.  
  3293. if (JSON.parse(localStorage.getItem('DuolingoProSettingsHumaneSolvingMode')) !== DuolingoProSettingsHumaneSolvingMode) {
  3294. settingsStuff("Duolingo Pro Humane Solving Mode", DuolingoProSettingsHumaneSolvingMode ? 'ON' : 'OFF');
  3295. }
  3296.  
  3297. localStorage.setItem('AutoSolverSettingsShowAutoSolverBox', AutoSolverSettingsShowAutoSolverBox);
  3298. localStorage.setItem('AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox', AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox);
  3299. localStorage.setItem('AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox', AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox);
  3300. localStorage.setItem('AutoSolverSettingsLowPerformanceMode', AutoSolverSettingsLowPerformanceMode);
  3301. localStorage.setItem('DuolingoProSettingsProBlockMode', DuolingoProSettingsProBlockMode);
  3302. localStorage.setItem('DuolingoProSettingsTurboSolveMode', DuolingoProSettingsTurboSolveMode);
  3303. localStorage.setItem('DuolingoProSettingsHumaneSolvingMode', DuolingoProSettingsHumaneSolvingMode);
  3304.  
  3305. if (!AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox) {
  3306. autoSolverBoxPracticeOnlyMode = false;
  3307. sessionStorage.setItem('autoSolverBoxPracticeOnlyMode', autoSolverBoxPracticeOnlyMode);
  3308. }
  3309.  
  3310. if (!AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox) {
  3311. autoSolverBoxPracticeOnlyMode = false;
  3312. sessionStorage.setItem('autoSolverBoxRepeatLessonMode', autoSolverBoxRepeatLessonMode);
  3313. }
  3314.  
  3315. console.log('Settings saved');
  3316.  
  3317. let DuolingoProSettingsBoxSaveButtonTextElement = DuolingoProSettingsBoxSaveButton.querySelector('.DuolingoProSettingsBoxSaveButtonTextOne');
  3318. DuolingoProSettingsBoxSaveButtonTextElement.textContent = 'SAVED';
  3319.  
  3320. setTimeout(function() {
  3321. //wasDuolingoProSettingsButtonOnePressed = false;
  3322. location.reload();
  3323. }, 600);
  3324.  
  3325. });
  3326.  
  3327. const DuolingoProSettingsBoxToggleOneIDElement = document.querySelector('#DuolingoProSettingsBoxToggleOneID');
  3328.  
  3329. DuolingoProSettingsBoxToggleOneIDElement.addEventListener('mousedown', () => {
  3330. if (!AutoSolverSettingsShowAutoSolverBox) {
  3331. DuolingoProSettingsBoxToggleOneIDElement.style.border = '2px solid rgb(var(--color-swan))';
  3332. DuolingoProSettingsBoxToggleOneIDElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  3333. } else {
  3334. DuolingoProSettingsBoxToggleOneIDElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  3335. DuolingoProSettingsBoxToggleOneIDElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  3336. }
  3337. });
  3338.  
  3339. DuolingoProSettingsBoxToggleOneIDElement.addEventListener('mouseup', () => {
  3340. AutoSolverSettingsShowAutoSolverBox = !AutoSolverSettingsShowAutoSolverBox; // Toggle the variable
  3341. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleOneIDElement, AutoSolverSettingsShowAutoSolverBox);
  3342. });
  3343.  
  3344. const DuolingoProSettingsBoxToggleTwoIDElement = document.querySelector('#DuolingoProSettingsBoxToggleTwoID');
  3345.  
  3346. DuolingoProSettingsBoxToggleTwoIDElement.addEventListener('mousedown', () => {
  3347. if (!AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox) {
  3348. DuolingoProSettingsBoxToggleTwoIDElement.style.border = '2px solid rgb(var(--color-swan))';
  3349. DuolingoProSettingsBoxToggleTwoIDElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  3350. } else {
  3351. DuolingoProSettingsBoxToggleTwoIDElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  3352. DuolingoProSettingsBoxToggleTwoIDElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  3353. }
  3354. });
  3355.  
  3356. DuolingoProSettingsBoxToggleTwoIDElement.addEventListener('mouseup', () => {
  3357. AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox = !AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox; // Toggle the variable
  3358. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleTwoIDElement, AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox);
  3359. });
  3360.  
  3361. const DuolingoProSettingsBoxToggleThreeIDElement = document.querySelector('#DuolingoProSettingsBoxToggleThreeID');
  3362.  
  3363. DuolingoProSettingsBoxToggleThreeIDElement.addEventListener('mousedown', () => {
  3364. if (!AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox) {
  3365. DuolingoProSettingsBoxToggleThreeIDElement.style.border = '2px solid rgb(var(--color-swan))';
  3366. DuolingoProSettingsBoxToggleThreeIDElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  3367. } else {
  3368. DuolingoProSettingsBoxToggleThreeIDElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  3369. DuolingoProSettingsBoxToggleThreeIDElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  3370. }
  3371. });
  3372.  
  3373. DuolingoProSettingsBoxToggleThreeIDElement.addEventListener('mouseup', () => {
  3374. AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox = !AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox; // Toggle the variable
  3375. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleThreeIDElement, AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox);
  3376. });
  3377.  
  3378. const DuolingoProSettingsBoxToggleFourIDElement = document.querySelector('#DuolingoProSettingsBoxToggleFourID');
  3379.  
  3380. DuolingoProSettingsBoxToggleFourIDElement.addEventListener('mousedown', () => {
  3381. if (!AutoSolverSettingsLowPerformanceMode) {
  3382. DuolingoProSettingsBoxToggleFourIDElement.style.border = '2px solid rgb(var(--color-swan))';
  3383. DuolingoProSettingsBoxToggleFourIDElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  3384. } else {
  3385. DuolingoProSettingsBoxToggleFourIDElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  3386. DuolingoProSettingsBoxToggleFourIDElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  3387. }
  3388. });
  3389.  
  3390. DuolingoProSettingsBoxToggleFourIDElement.addEventListener('mouseup', () => {
  3391. AutoSolverSettingsLowPerformanceMode = !AutoSolverSettingsLowPerformanceMode; // Toggle the variable
  3392. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleFourIDElement, AutoSolverSettingsLowPerformanceMode);
  3393. });
  3394.  
  3395. const DuolingoProSettingsBoxToggleFiveIDElement = document.querySelector('#DuolingoProSettingsBoxToggleFiveID');
  3396.  
  3397. DuolingoProSettingsBoxToggleFiveIDElement.addEventListener('mousedown', () => {
  3398. if (!DuolingoProSettingsProBlockMode) {
  3399. DuolingoProSettingsBoxToggleFiveIDElement.style.border = '2px solid rgb(var(--color-swan))';
  3400. DuolingoProSettingsBoxToggleFiveIDElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  3401. } else {
  3402. DuolingoProSettingsBoxToggleFiveIDElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  3403. DuolingoProSettingsBoxToggleFiveIDElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  3404. }
  3405. });
  3406.  
  3407. DuolingoProSettingsBoxToggleFiveIDElement.addEventListener('mouseup', () => {
  3408. DuolingoProSettingsProBlockMode = !DuolingoProSettingsProBlockMode; // Toggle the variable
  3409. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleFiveIDElement, DuolingoProSettingsProBlockMode);
  3410. });
  3411.  
  3412. const DuolingoProSettingsBoxToggleSixIDElement = document.querySelector('#DuolingoProSettingsBoxToggleSixID');
  3413.  
  3414. DuolingoProSettingsBoxToggleSixIDElement.addEventListener('mousedown', () => {
  3415. if (!DuolingoProSettingsTurboSolveMode) {
  3416. DuolingoProSettingsBoxToggleSixIDElement.style.border = '2px solid rgb(var(--color-swan))';
  3417. DuolingoProSettingsBoxToggleSixIDElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  3418. } else {
  3419. DuolingoProSettingsBoxToggleSixIDElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  3420. DuolingoProSettingsBoxToggleSixIDElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  3421. }
  3422. });
  3423.  
  3424. DuolingoProSettingsBoxToggleSixIDElement.addEventListener('mouseup', () => {
  3425. DuolingoProSettingsTurboSolveMode = !DuolingoProSettingsTurboSolveMode; // Toggle the variable
  3426. if (DuolingoProSettingsTurboSolveMode && DuolingoProSettingsHumaneSolvingMode) {
  3427. DuolingoProSettingsHumaneSolvingMode = false;
  3428. }
  3429.  
  3430. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleSixIDElement, DuolingoProSettingsTurboSolveMode);
  3431. });
  3432.  
  3433. const DuolingoProSettingsBoxToggleSevenIDElement = document.querySelector('#DuolingoProSettingsBoxToggleSevenID');
  3434.  
  3435. DuolingoProSettingsBoxToggleSevenIDElement.addEventListener('mousedown', () => {
  3436. if (!DuolingoProSettingsHumaneSolvingMode) {
  3437. DuolingoProSettingsBoxToggleSevenIDElement.style.border = '2px solid rgb(var(--color-swan))';
  3438. DuolingoProSettingsBoxToggleSevenIDElement.style.borderBottom = '2px solid rgb(var(--color-swan))';
  3439. } else {
  3440. DuolingoProSettingsBoxToggleSevenIDElement.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  3441. DuolingoProSettingsBoxToggleSevenIDElement.style.borderBottom = '2px solid rgba(0, 0, 0, 0.20)';
  3442. }
  3443. });
  3444.  
  3445. DuolingoProSettingsBoxToggleSevenIDElement.addEventListener('mouseup', () => {
  3446. DuolingoProSettingsHumaneSolvingMode = !DuolingoProSettingsHumaneSolvingMode; // Toggle the variable
  3447. if (DuolingoProSettingsHumaneSolvingMode && DuolingoProSettingsTurboSolveMode) {
  3448. DuolingoProSettingsTurboSolveMode = false;
  3449. }
  3450.  
  3451. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleSevenIDElement, DuolingoProSettingsHumaneSolvingMode);
  3452. });
  3453.  
  3454. addEventListener('mouseup', () => {
  3455. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleOneIDElement, AutoSolverSettingsShowAutoSolverBox);
  3456. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleTwoIDElement, AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox);
  3457. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleThreeIDElement, AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox);
  3458. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleFourIDElement, AutoSolverSettingsLowPerformanceMode);
  3459. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleFiveIDElement, DuolingoProSettingsProBlockMode);
  3460. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleSixIDElement, DuolingoProSettingsTurboSolveMode);
  3461. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleSevenIDElement, DuolingoProSettingsHumaneSolvingMode);
  3462. });
  3463.  
  3464. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleOneIDElement, AutoSolverSettingsShowAutoSolverBox);
  3465. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleTwoIDElement, AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox);
  3466. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleThreeIDElement, AutoSolverSettingsShowRepeatLessonModeForAutoSolverBox);
  3467. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleFourIDElement, AutoSolverSettingsLowPerformanceMode);
  3468. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleFiveIDElement, DuolingoProSettingsProBlockMode);
  3469. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleSixIDElement, DuolingoProSettingsTurboSolveMode);
  3470. updateDuolingoProSettingsToggle(DuolingoProSettingsBoxToggleSevenIDElement, DuolingoProSettingsHumaneSolvingMode);
  3471.  
  3472. }
  3473. } else {
  3474. // Remove the content if it was previously injected
  3475. if (injectedDuolingoProSettingsBoxElement) {
  3476. document.body.removeChild(injectedDuolingoProSettingsBoxElement);
  3477. document.head.removeChild(injectedDuolingoProSettingsBoxStyle);
  3478. injectedDuolingoProSettingsBoxElement = null;
  3479. injectedDuolingoProSettingsBoxStyle = null;
  3480. }
  3481. }
  3482. }
  3483.  
  3484. setInterval(injectDuolingoProSettingsBox, 100);
  3485.  
  3486. function updateDuolingoProSettingsToggle(element, value) {
  3487. let textElement = element.querySelector('.DuolingoProSettingsBoxToggleTypeOneTextOne');
  3488. if (element.id === 'DuolingoProSettingsBoxToggleThreeID') {
  3489. textElement.textContent = value ? "LESSON 1" : "OFF";
  3490. } else {
  3491. textElement.textContent = value ? "ON" : "OFF";
  3492. }
  3493. if (value) {
  3494. element.style.background = '#007AFF';
  3495. element.style.border = '2px solid rgba(0, 0, 0, 0.20)';
  3496. element.style.borderBottom = '4px solid rgba(0, 0, 0, 0.20)';
  3497. textElement.style.color = '#fff';
  3498. } else {
  3499. element.style.background = 'rgb(var(--color-snow))';
  3500. element.style.border = '2px solid rgb(var(--color-swan))';
  3501. element.style.borderBottom = '4px solid rgb(var(--color-swan))';
  3502. textElement.style.color = 'rgb(var(--color-eel))';
  3503. }
  3504. }
  3505.  
  3506.  
  3507. function iwantstolol() {
  3508. try {
  3509. let nextButtonButton = document.querySelector('[data-test="story-start"]');
  3510. if (nextButtonButton) {
  3511. nextButtonButton.click();
  3512. }
  3513. } catch (error) {
  3514. }
  3515. }
  3516.  
  3517. setInterval(iwantstolol, 500);
  3518.  
  3519. let duolingoProCurrentVersion = "2.0 BETA 6";
  3520. if (String(localStorage.getItem('duolingoProLastInstalledVersion')) === null || String(localStorage.getItem('duolingoProLastInstalledVersion')) === "null") {
  3521. setTimeout(function() {
  3522. updateStuff("Downloaded Version", duolingoProCurrentVersion);
  3523. }, 2000);
  3524. setTimeout(function() {
  3525. localStorage.setItem('duolingoProLastInstalledVersion', duolingoProCurrentVersion);
  3526. }, 3000);
  3527. } else if (String(localStorage.getItem('duolingoProLastInstalledVersion')) !== duolingoProCurrentVersion) {
  3528. setTimeout(function() {
  3529. updateStuff("Updated Version", duolingoProCurrentVersion, String(localStorage.getItem('duolingoProLastInstalledVersion')));
  3530. }, 2000);
  3531. setTimeout(function() {
  3532. localStorage.setItem('duolingoProLastInstalledVersion', duolingoProCurrentVersion);
  3533. }, 3000);
  3534. }
  3535.  
  3536. let screenWidth = screen.width;
  3537.  
  3538. function BegMobileSupport() {
  3539. try {
  3540. screenWidth = screen.width;
  3541. if (Number(localStorage.getItem('screenWidthDuolingoPro')) === null || isNaN(Number(localStorage.getItem('screenWidthDuolingoPro'))) || Number(localStorage.getItem('screenWidthDuolingoPro')) === 0) {
  3542. setTimeout(function() {
  3543. settingsStuff("Screen Width Set To", String(screenWidth));
  3544. }, 2000);
  3545. setTimeout(function() {
  3546. localStorage.setItem('screenWidthDuolingoPro', screenWidth);
  3547. }, 3000);
  3548. setTimeout(function() {
  3549. BegMobileSupport();
  3550. }, 4000);
  3551. } else if (Number(localStorage.getItem('screenWidthDuolingoPro')) !== screenWidth) {
  3552. setTimeout(function() {
  3553. settingsStuff("Screen Width Change To", String(screenWidth) + " from " + localStorage.getItem('screenWidthDuolingoPro'));
  3554. }, 2000);
  3555. setTimeout(function() {
  3556. localStorage.setItem('screenWidthDuolingoPro', screenWidth);
  3557. }, 3000);
  3558. setTimeout(function() {
  3559. BegMobileSupport();
  3560. }, 4000);
  3561. } else {
  3562. setTimeout(function() {
  3563. BegMobileSupport();
  3564. }, 1000);
  3565. }
  3566. } catch (error) {
  3567. }
  3568. }
  3569.  
  3570. BegMobileSupport();
  3571.  
  3572. function MidMobileSupport() {
  3573. try {
  3574. screenWidth = screen.width;
  3575. const boxFirst = document.querySelector('.boxFirst');
  3576.  
  3577. if (screenWidth < 700) {
  3578. boxFirst.style.marginBottom = '64px';
  3579. } else {
  3580. boxFirst.style.marginBottom = '';
  3581. }
  3582. } catch (error) {
  3583. }
  3584. }
  3585.  
  3586. setInterval(MidMobileSupport, 1000);
  3587.  
  3588.  
  3589.  
  3590.  
  3591. async function solving() {
  3592. if (solvingIntervalId) {
  3593. clearInterval(solvingIntervalId);
  3594. solvingIntervalId = undefined;
  3595. document.getElementById("solveAllButton").innerText = "SOLVE ALL";
  3596. isAutoMode = false;
  3597. } else {
  3598. if (DuolingoProSettingsTurboSolveMode) {
  3599. document.getElementById("solveAllButton").innerText = "PAUSE SOLVE";
  3600. isAutoMode = true;
  3601. solvingIntervalId = setInterval(await solve, 100);
  3602. } else if (simulated){
  3603. document.getElementById("solveAllButton").innerText = "PAUSE SOLVE";
  3604. isAutoMode = true;
  3605. solvingIntervalId = setInterval(solve, 150);
  3606. } else {
  3607. document.getElementById("solveAllButton").innerText = "PAUSE SOLVE";
  3608. isAutoMode = true;
  3609. solvingIntervalId = setInterval(solve, 500);
  3610. }
  3611. }
  3612. }
  3613.  
  3614. async function solve() {
  3615. const selAgain = document.querySelectorAll('[data-test="player-practice-again"]');
  3616. const practiceAgain = document.querySelector('[data-test="player-practice-again"]');
  3617. if (selAgain.length === 1 && isAutoMode) {
  3618. // Make sure it's the `practice again` button
  3619. //if (selAgain[0].innerHTML.toLowerCase() === 'practice again') {
  3620. // Click the `practice again` button
  3621. if (simulated == true) await sleep(50, 50);
  3622. selAgain[0].click();
  3623. // Terminate
  3624. return;
  3625. //}
  3626. }
  3627. if (practiceAgain !== null && isAutoMode) {
  3628. if (!AutoSolverSettingsShowPracticeOnlyModeForAutoSolverBox) {
  3629. practiceAgain.click();
  3630. return;
  3631. }
  3632. }
  3633. try {
  3634. window.sol = findReact(document.getElementsByClassName('_3FiYg')[0]).props.currentChallenge;
  3635. } catch {
  3636. let next = document.querySelector('[data-test="player-next"]');
  3637. if (next) {
  3638. next.click();
  3639. }
  3640. return;
  3641. }
  3642. if (!window.sol) {
  3643. return;
  3644. }
  3645.  
  3646. if (isSolving == true) {
  3647. return;
  3648. }
  3649. let nextButton = document.querySelector('[data-test="player-next"]');
  3650. if (!nextButton) {
  3651. return;
  3652. }
  3653. nextButton.click(); // skips motivational messages
  3654. if (nextButton.getAttribute('aria-disabled') === 'true') {
  3655. isSolving = true;
  3656. if (simulated == true) await sleep(300, 300); // time to read the question
  3657.  
  3658. if (document.querySelectorAll('[data-test*="challenge-speak"]').length > 0) {
  3659. if (debug) {
  3660. document.getElementById("solveAllButton").innerText = 'Challenge Speak';
  3661. }
  3662. waitForElm('button[data-test="player-skip"]').then((skip) => {
  3663. skip.click();
  3664. });
  3665. } else if (window.sol.type === 'listenMatch') {
  3666. // listen match question
  3667. if (debug) {
  3668. document.getElementById("solveAllButton").innerText = 'Listen Match';
  3669. }
  3670. waitForElm('button[data-test="player-skip"]').then((skip) => {
  3671. skip.click();
  3672. });
  3673. } else if (document.querySelectorAll('[data-test="challenge-choice"]').length > 0) {
  3674. // choice challenge
  3675. if (debug) {
  3676. document.getElementById("solveAllButton").innerText = 'Challenge Choice';
  3677. }
  3678. // text input (if one exists)
  3679. if (document.querySelectorAll('[data-test="challenge-text-input"]').length > 0) {
  3680. if (debug) {
  3681. document.getElementById("solveAllButton").innerText = 'Challenge Choice with Text Input';
  3682. }
  3683. let elm = document.querySelectorAll('[data-test="challenge-text-input"]')[0];
  3684. elm.focus();
  3685. let answer = window.sol.correctSolutions ? window.sol.correctSolutions[0].split(/(?<=^\S+)\s/)[1] : (window.sol.displayTokens ? window.sol.displayTokens.find(t => t.isBlank).text : window.sol.prompt);
  3686. if (!answer) return;
  3687.  
  3688. if (simulated == true) await sleep(answer.length*100, 100);
  3689. let nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set;
  3690. nativeInputValueSetter.call(elm, simplifyString(answer));
  3691. let inputEvent = new Event('input', {
  3692. bubbles: true
  3693. });
  3694.  
  3695. elm.dispatchEvent(inputEvent);
  3696. }
  3697. // choice
  3698. if (window.sol.correctTokens !== undefined) {
  3699. await correctTokensRun();
  3700. } else if (window.sol.correctIndex !== undefined) {
  3701. document.querySelectorAll('[data-test="challenge-choice"]')[window.sol.correctIndex].click();
  3702. } else if (window.sol.correctSolutions !== undefined) {
  3703. var xpath = `//div[@data-test="challenge-choice" and ./div[@data-test="challenge-judge-text"]/text()="${window.sol.correctSolutions[0].split(/(?<=^\S+)\s/)[0]}"]`;
  3704. document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue?.click();
  3705. }
  3706. } else if (document.querySelectorAll('[data-test$="challenge-tap-token"]').length > 0) {
  3707. // match correct pairs challenge
  3708. if (window.sol.pairs !== undefined) {
  3709. if (debug) {
  3710. document.getElementById("solveAllButton").innerText = 'Pairs';
  3711. }
  3712. await correctPairsRun();
  3713. } else if (window.sol.correctTokens !== undefined) {
  3714. if (debug) {
  3715. document.getElementById("solveAllButton").innerText = 'Token Run';
  3716. }
  3717. await correctTokensRun();
  3718. } else if (window.sol.correctIndices !== undefined) {
  3719. if (debug) {
  3720. document.getElementById("solveAllButton").innerText = 'Indices Run';
  3721. }
  3722. await correctIndicesRun();
  3723. }
  3724. } else if (document.querySelectorAll('[data-test="challenge-tap-token-text"]').length > 0) {
  3725. if (debug) {
  3726. document.getElementById("solveAllButton").innerText = 'Challenge Tap Token Text';
  3727. }
  3728. // fill the gap challenge
  3729. await correctIndicesRun();
  3730. } else if (document.querySelectorAll('[data-test="challenge-text-input"]').length > 0) {
  3731. if (debug) {
  3732. document.getElementById("solveAllButton").innerText = 'Challenge Text Input';
  3733. }
  3734. let elm = document.querySelectorAll('[data-test="challenge-text-input"]')[0];
  3735. elm.focus();
  3736. let answer = window.sol.correctSolutions ? window.sol.correctSolutions[0] : (window.sol.displayTokens ? window.sol.displayTokens.find(t => t.isBlank).text : window.sol.prompt);
  3737. if (!answer) return;
  3738.  
  3739. if (simulated == true) await sleep(answer.length*100, 100);
  3740. let nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set;
  3741. nativeInputValueSetter.call(elm, simplifyString(answer));
  3742. let inputEvent = new Event('input', {
  3743. bubbles: true
  3744. });
  3745.  
  3746. elm.dispatchEvent(inputEvent);
  3747. } else if (document.querySelectorAll('[data-test*="challenge-partialReverseTranslate"]').length > 0) {
  3748. if (debug) {
  3749. document.getElementById("solveAllButton").innerText = 'Partial Reverse';
  3750. }
  3751. let elm = document.querySelector('[data-test*="challenge-partialReverseTranslate"]')?.querySelector("span[contenteditable]");
  3752. elm.focus();
  3753. let answer = window.sol?.displayTokens?.filter(t => t.isBlank)?.map(t => t.text)?.join()?.replaceAll(',', '');
  3754. if (!answer) return;
  3755.  
  3756. if (simulated == true) await sleep(answer.length*100, 100);
  3757. let nativeInputNodeTextSetter = Object.getOwnPropertyDescriptor(Node.prototype, "textContent").set;
  3758. nativeInputNodeTextSetter.call(elm, simplifyString(answer));
  3759. let inputEvent = new Event('input', {
  3760. bubbles: true
  3761. });
  3762.  
  3763. elm.dispatchEvent(inputEvent);
  3764. } else if (document.querySelectorAll('textarea[data-test="challenge-translate-input"]').length > 0) {
  3765. if (debug) {
  3766. document.getElementById("solveAllButton").innerText = 'Challenge Translate Input';
  3767. }
  3768. const elm = document.querySelector('textarea[data-test="challenge-translate-input"]');
  3769. elm.focus();
  3770. let answer = window.sol.correctSolutions ? window.sol.correctSolutions[0] : window.sol.prompt;
  3771. if (!answer) return;
  3772.  
  3773. if (simulated == true) await sleep(answer.length*100, 100);
  3774. const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, "value").set;
  3775. nativeInputValueSetter.call(elm, simplifyString(answer));
  3776.  
  3777. let inputEvent = new Event('input', {
  3778. bubbles: true
  3779. });
  3780.  
  3781. elm.dispatchEvent(inputEvent);
  3782. }
  3783. await nextButtonClick();
  3784. anonymousSolveDetails('1');
  3785. nextButtonClick();
  3786. }
  3787. isSolving = false;
  3788. }
  3789.  
  3790. function waitForElm(selector) {
  3791. return new Promise(resolve => {
  3792. if (document.querySelector(selector) && (document.querySelector(selector).getAttribute('aria-disabled') !== 'true')) {
  3793. return resolve(document.querySelector(selector));
  3794. }
  3795.  
  3796. const observer = new MutationObserver(mutations => {
  3797. if (document.querySelector(selector) && (document.querySelector(selector).getAttribute('aria-disabled') !== 'true')) {
  3798. observer.disconnect();
  3799. resolve(document.querySelector(selector));
  3800. }
  3801. });
  3802.  
  3803. observer.observe(document.body, {
  3804. childList: true,
  3805. subtree: true
  3806. });
  3807. });
  3808. }
  3809.  
  3810.  
  3811. function simplifyString(str) {
  3812. return str.replace(/[\p{P}$+<=>^`|~]/gu, '').replace(/\s{2,}/g, ' ').toLowerCase();
  3813. }
  3814.  
  3815. function randInt(min, max) {
  3816. min = Math.ceil(min);
  3817. max = Math.floor(max);
  3818. return Math.floor(Math.random() * (max - min + 1)) + min;
  3819. }
  3820.  
  3821. function sleep(ms, tolerance = 0) {
  3822. /** Sleeps for a random amount of time within the range [ms, ms + tolerance]. */
  3823. let sleepTime = randInt(ms, ms + tolerance)
  3824. return new Promise(resolve => setTimeout(resolve, sleepTime));
  3825. }
  3826.  
  3827. function sleepProbability(ms, tolerance = 0, probability = 0.05) {
  3828. /** Has a probability to sleep for ms milliseconds. */
  3829. if (Math.random() < probability) {
  3830. return sleep(ms, tolerance)
  3831. }
  3832. }
  3833.  
  3834. function until(conditionFunction) {
  3835. /**
  3836. * Utility function to resolve a promise when condition is fulfilled.
  3837. * Usage: await until(_ => condition == true);
  3838. */
  3839. const poll = resolve => {
  3840. if(conditionFunction()) resolve();
  3841. else setTimeout(_ => poll(resolve), 150); // callback interval
  3842. }
  3843.  
  3844. return new Promise(poll);
  3845. }
  3846.  
  3847. async function nextButtonClick() {
  3848. return Promise.race([
  3849. new Promise(async (resolve) => {
  3850. let next = await waitForElm('[data-test="player-next"]');
  3851. await until(_ => isTokenRunning == false);
  3852. if (simulated == true) await sleep(50, 50);
  3853. next.click();
  3854. resolve();
  3855. }),
  3856. new Promise(async (resolve) => {
  3857. setTimeout(() => resolve(), 700); // Maximum wait time until the "next" button shows up
  3858. })
  3859. ]);
  3860. }
  3861.  
  3862.  
  3863. async function correctTokensRun() {
  3864. isTokenRunning = true;
  3865. const all_tokens = document.querySelectorAll('[data-test$="challenge-tap-token"]');
  3866. const correct_tokens = window.sol.correctTokens;
  3867. const clicked_tokens = [];
  3868. for (const correct_token of correct_tokens) {
  3869. const matching_elements = Array.from(all_tokens).filter(element => element.textContent.trim() === correct_token.trim());
  3870. if (simulated == true) {
  3871. await sleepProbability(200, 500, 0.1) // has a small chance to stay idle for a while
  3872. await sleep(50, 150);
  3873. }
  3874. if (matching_elements.length > 0) {
  3875. const match_index = clicked_tokens.filter(token => token.textContent.trim() === correct_token.trim()).length;
  3876. if (match_index < matching_elements.length) {
  3877. matching_elements[match_index].click();
  3878. clicked_tokens.push(matching_elements[match_index]);
  3879. } else {
  3880. clicked_tokens.push(matching_elements[0]);
  3881. }
  3882. }
  3883. };
  3884. isTokenRunning = false;
  3885. }
  3886.  
  3887. async function correctIndicesRun() {
  3888. isTokenRunning = true;
  3889. if (window.sol.correctIndices) {
  3890. for (const index of window.sol.correctIndices) {
  3891. if (simulated == true) await sleep(50, 150);
  3892. document.querySelectorAll('div[data-test="word-bank"] [data-test="challenge-tap-token-text"]')[index].click();
  3893. };
  3894. // nextButtonClick();
  3895. }
  3896. isTokenRunning = false;
  3897. }
  3898.  
  3899. async function correctPairsRun() {
  3900. isTokenRunning = true;
  3901. let nl = document.querySelectorAll('button[data-test*="challenge-tap-token"]');
  3902. if (document.querySelectorAll('[data-test*="challenge-tap-token-text"]').length === nl.length) {
  3903. for (const pair of window.sol.pairs) {
  3904. for (let i = 0; i < nl.length; i++) {
  3905. if (simulated == true) await sleep(20, 50);
  3906. const nlInnerText = nl[i].querySelector('[data-test="challenge-tap-token-text"]').innerText.toLowerCase().trim();
  3907. try {
  3908. if (
  3909. (
  3910. nlInnerText === pair.transliteration.toLowerCase().trim() ||
  3911. nlInnerText === pair.character.toLowerCase().trim()
  3912. )
  3913. && !nl[i].disabled
  3914. ) {
  3915. nl[i].click()
  3916. }
  3917. } catch (TypeError) {
  3918. if (
  3919. (
  3920. nlInnerText === pair.learningToken.toLowerCase().trim() ||
  3921. nlInnerText === pair.fromToken.toLowerCase().trim()
  3922. )
  3923. && !nl[i].disabled
  3924. ) {
  3925. nl[i].click()
  3926. }
  3927. }
  3928. }
  3929. }
  3930. }
  3931. isTokenRunning = false;
  3932. }
  3933.  
  3934. function findSubReact(dom, traverseUp = 0) {
  3935. const key = Object.keys(dom).find(key => key.startsWith("__reactProps$"));
  3936. return dom.parentElement[key].children.props;
  3937. }
  3938.  
  3939. function findReact(dom, traverseUp = 0) {
  3940. let reactProps = Object.keys(dom.parentElement).find((key) => key.startsWith("__reactProps$"));
  3941. while (traverseUp-- > 0 && dom.parentElement) {
  3942. dom = dom.parentElement;
  3943. reactProps = Object.keys(dom.parentElement).find((key) => key.startsWith("__reactProps$"));
  3944. }
  3945. if(dom?.parentElement?.[reactProps]?.children[0] == null){
  3946. return dom?.parentElement?.[reactProps]?.children[1]?._owner?.stateNode;
  3947. } else {
  3948. return dom?.parentElement?.[reactProps]?.children[0]?._owner?.stateNode;
  3949. }
  3950. //return dom?.parentElement?.[reactProps]?.children[0]?._owner?.stateNode;
  3951. }
  3952.  
  3953. window.findReact = findReact;
  3954.  
  3955. window.ss = solving;
  3956.  
  3957.  
  3958. const SUPABASE_URL = 'https://henexdxgboppadgsxegm.supabase.co';
  3959. const ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImhlbmV4ZHhnYm9wcGFkZ3N4ZWdtIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTQ5MDI0ODEsImV4cCI6MjAxMDQ3ODQ4MX0.k3Y9mjNaw_SKrHfWr9dA7PkWCOl_i2zEUjo77OxNH68';
  3960.  
  3961. const supabase = window.supabase.createClient(SUPABASE_URL, ANON_KEY);
  3962.  
  3963. async function settingsStuff(messageValue, value) {
  3964. console.log("settingsStuff called");
  3965. // Add a breakpoint here.
  3966. // debugger;
  3967.  
  3968. // const messageText = document.getElementById('messageInput').value;
  3969.  
  3970. // , timestamptz: new Date().toISOString().substr(0, 19)
  3971.  
  3972. if (messageValue) {
  3973. const { data, error } = await supabase
  3974. .from('settings_stuff')
  3975. .insert([{ text: messageValue, value: value, randomValue: randomValue, duolingo_pro_version: duolingoProCurrentVersion }]);
  3976.  
  3977. if (error) {
  3978. console.error("Error sending message:", error);
  3979. } else {
  3980. console.log("Message sent successfully:", data);
  3981. }
  3982. } else {
  3983. console.error("Message text is empty.");
  3984. }
  3985. }
  3986.  
  3987. async function sendFeedbackNew(feedbackTextOne, feedbackTypeOne) {
  3988. console.log("sendFeedbackNew called");
  3989. // Add a breakpoint here.
  3990. // debugger;
  3991.  
  3992. // const messageText = document.getElementById('messageInput').value;
  3993.  
  3994. // , timestamptz: new Date().toISOString().substr(0, 19)
  3995.  
  3996. if (feedbackTextOne) {
  3997. const { data, error } = await supabase
  3998. .from('send_feedback')
  3999. .insert([{ feedback_text: feedbackTextOne, feedback_type: feedbackTypeOne, randomValue: randomValue, duolingo_pro_version: duolingoProCurrentVersion }]);
  4000.  
  4001. if (error) {
  4002. console.error("Error sending message:", error);
  4003. sendFeedbackStatus = 'error';
  4004. } else {
  4005. console.log("Message sent successfully:", data);
  4006. sendFeedbackStatus = 'true';
  4007. }
  4008. } else {
  4009. console.error("Message text is empty.");
  4010. sendFeedbackStatus = 'empty';
  4011. }
  4012. }
  4013.  
  4014. async function analyticsLogsSend(text, value) {
  4015. console.log("analyticsLogsSend called");
  4016. // Add a breakpoint here.
  4017. // debugger;
  4018.  
  4019. // const messageText = document.getElementById('messageInput').value;
  4020.  
  4021. // , timestamptz: new Date().toISOString().substr(0, 19)
  4022.  
  4023. if (text) {
  4024. const { data, error } = await supabase
  4025. .from('analytics_logs')
  4026. .insert([{ text: text, value: value, randomValue: randomValue, duolingo_pro_version: duolingoProCurrentVersion }]);
  4027.  
  4028. if (error) {
  4029. console.error("Error sending message:", error);
  4030. } else {
  4031. console.log("Message sent successfully:", data);
  4032. }
  4033. } else {
  4034. console.error("Message text is empty.");
  4035. }
  4036. }
  4037.  
  4038. async function anonymousSolveDetails(value) {
  4039. console.log("anonymousSolveDetails called");
  4040. // Add a breakpoint here.
  4041. // debugger;
  4042.  
  4043. // const messageText = document.getElementById('messageInput').value;
  4044.  
  4045. // , timestamptz: new Date().toISOString().substr(0, 19)
  4046.  
  4047. if (value) {
  4048. const { data, error } = await supabase
  4049. .from('solve_details')
  4050. .insert([{ value: value, duolingo_pro_version: duolingoProCurrentVersion }]);
  4051.  
  4052. if (error) {
  4053. console.error("Error sending message:", error);
  4054. } else {
  4055. console.log("Message sent successfully:", data);
  4056. }
  4057. } else {
  4058. console.error("Message text is empty.");
  4059. }
  4060. }
  4061.  
  4062. async function updateStuff(status, to, from) {
  4063. if (status) {
  4064. const { data, error } = await supabase
  4065. .from('update_stuff')
  4066. .insert([{ status: status, to: to, from: from, randomValue: randomValue }]);
  4067.  
  4068. if (error) {
  4069. console.error("Error sending message:", error);
  4070. } else {
  4071. console.log("Message sent successfully:", data);
  4072. }
  4073. } else {
  4074. console.error("Message text is empty.");
  4075. }
  4076. }