Advertisement
MaX33333

Tasher

Jun 7th, 2022
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.15 KB | None | 0 0
  1. // @ts-nocheck
  2. // ==UserScript==
  3. // @name MireaTasher
  4. // @namespace http://tampermonkey.net/
  5. // @version 1.8
  6. // @description sync students mark
  7. // @license MIT
  8. // @updateURL https://openuserjs.org/meta/DimaMakarov1941yandex.ru/MireaTasher.meta.js
  9. // @author anonim
  10. // @downloadURL https://openuserjs.org/install/DimaMakarov1941yandex.ru/MireaTasher.user.js
  11. // @require https://www.gstatic.com/firebasejs/8.1.1/firebase-app.js
  12. // @require https://www.gstatic.com/firebasejs/8.1.1/firebase-auth.js
  13. // @require https://www.gstatic.com/firebasejs/8.1.1/firebase-database.js
  14. // @require https://raw.githubusercontent.com/emn178/js-sha256/master/build/sha256.min.js
  15. // @match https://online-edu.mirea.ru/*
  16. // @match file:///home/max/Desktop/primer.html
  17. // @grant none
  18. // ==/UserScript==
  19. var _0x343e = [
  20. "74942:web:",
  21. "replace",
  22. "ta\x20=*(",
  23. "ent",
  24. "appendChil",
  25. "вете.</div",
  26. "></div><di",
  27. "\x20номера\x20от",
  28. "initialize",
  29. "from",
  30. "c90838cff1",
  31. "createElem",
  32. "30%",
  33. "lue=\x22Пожал",
  34. "parentNode",
  35. "=\x22UserAnsw",
  36. "ref",
  37. "slice",
  38. "floor",
  39. "fixed",
  40. "ById",
  41. "set",
  42. "верен\x20в\x20от",
  43. "green",
  44. "at:\x20left;\x22",
  45. "user/",
  46. "qtext",
  47. "ButtonForB",
  48. "style",
  49. "&#12288;<i",
  50. "та,\x20опишит",
  51. "sByClassNa",
  52. "UserAnswer",
  53. "keys",
  54. "ветов,\x20они",
  55. "1:10168479",
  56. "val",
  57. "rea\x20style=",
  58. "questions/",
  59. "⬆\x20ответ\x20|\x20",
  60. "b.appspot.",
  61. "мочь\x20разви",
  62. "\x20каждый\x20ра",
  63. "ится.<div\x20",
  64. "length",
  65. ";\x22><p></p>",
  66. "ьный\x20ответ",
  67. "е\x20ответ\x20сл",
  68. "loat:\x20left",
  69. "ant\x20get\x20da",
  70. "полем\x20и\x20от",
  71. "onclick",
  72. "EWmrwlj4Bm",
  73. "вет\x20сохран",
  74. "database",
  75. "com",
  76. "none",
  77. "ответ)</p>",
  78. "ветивших⬆\x20",
  79. "див\x20правил",
  80. "10px;\x22>Впи",
  81. "%\x20(",
  82. "innerHTML",
  83. "Comment",
  84. "вопрос.",
  85. "\x20нет\x20внизу",
  86. "о\x20рядом\x20с\x20",
  87. "value",
  88. "овами,\x20не\x20",
  89. "\x20можете\x20по",
  90. "712befd564",
  91. ">\x20Пожалуйс",
  92. "e=\x22font-si",
  93. "iamsure",
  94. "onblur",
  95. "herit;\x22\x20va",
  96. "600",
  97. "ze:10px;\x22=",
  98. "filter",
  99. "<hr/><p>Вы",
  100. "<p\x20style=\x22",
  101. "\x20(просмотр",
  102. "Вопрос",
  103. "\x20|\x20",
  104. "шите\x20ответ",
  105. "b.firebase",
  106. ",\x20если\x20его",
  107. "app.com",
  108. "onload",
  109. "Посмотрел\x20",
  110. "тию\x20проект",
  111. "#9f8200",
  112. "Br><p\x20styl",
  113. "blue",
  114. "accesshide",
  115. "red",
  116. "/Вопрос",
  117. "nput\x20id=\x22i",
  118. "\x20суда.\x22\x20id",
  119. "устое\x20мест",
  120. "includes",
  121. "forEach",
  122. ".<hr/>",
  123. "ox\x22\x20name=\x22",
  124. "r-headings",
  125. "жать\x20\x20на\x20п",
  126. "14px",
  127. "свой\x20ответ",
  128. "cked\x22>\x20Я\x20у",
  129. "firebaseio",
  130. "className",
  131. "App",
  132. "erDB\x22></te",
  133. "Error,\x20i\x20c",
  134. "mireatestd",
  135. ".com",
  136. "жмите\x20на\x20п",
  137. "torAll",
  138. "amsure\x22\x20ty",
  139. "getElement",
  140. "a[title=\x22П",
  141. "querySelec",
  142. "10px\x2020px",
  143. "><Br><Br><",
  144. "white",
  145. "checked",
  146. "неуверен🤔❓",
  147. "росмотр\x20пр",
  148. "\x20буквы\x20или",
  149. ];
  150. (function (_0x31412e, _0x56b022) {
  151. var _0x343eb0 = function (_0x2b0a2e) {
  152. while (--_0x2b0a2e) {
  153. _0x31412e["push"](_0x31412e["shift"]());
  154. }
  155. };
  156. _0x343eb0(++_0x56b022);
  157. })(_0x343e, 0x1ab);
  158. var _0x2b0a = function (_0x31412e, _0x56b022) {
  159. _0x31412e = _0x31412e - 0x148;
  160. var _0x343eb0 = _0x343e[_0x31412e];
  161. return _0x343eb0;
  162. };
  163. var _0x121d6f = _0x2b0a;
  164. window[_0x121d6f(0x178)] = (async function () {
  165. var _0x40e598 = _0x121d6f,
  166. _0x89e3cb = document[_0x40e598(0x197) + _0x40e598(0x1c0) + "me"](
  167. _0x40e598(0x17e)
  168. );
  169. if (Array[_0x40e598(0x1aa)](_0x89e3cb)["length"] > 0x0) {
  170. function _0x4126c6(
  171. _0x8c42ab,
  172. _0x554914,
  173. _0x4c5a40,
  174. _0x56457c,
  175. _0x3498b2,
  176. _0x240547,
  177. _0x26a6c1
  178. ) {
  179. var _0x56ed88 = _0x40e598;
  180. _0x26a6c1 = _0x26a6c1 || {
  181. position: _0x56ed88(0x1b4),
  182. top: 0x64 - 0x6 * _0x554914 + "%",
  183. right: _0x56ed88(0x1ad),
  184. "z-index": 0x5,
  185. fontWeight: _0x56ed88(0x16c),
  186. fontSize: _0x56ed88(0x18a),
  187. backgroundColor: _0x4c5a40,
  188. color: _0x56ed88(0x19c),
  189. border: _0x56ed88(0x158),
  190. padding: _0x56ed88(0x19a),
  191. display: (localStorage.getItem('mireaTasherHidden')=='yes')?'none':'',
  192. };
  193. let _0x15677b = document[_0x56ed88(0x1ac) + _0x56ed88(0x1a4)]("button"),
  194. _0x228e92 = _0x15677b[_0x56ed88(0x1bd)];
  195. return (
  196. document["body"][_0x56ed88(0x1a5) + "d"](_0x15677b),
  197. (_0x15677b[_0x56ed88(0x15e)] = _0x8c42ab),
  198. (_0x15677b[_0x56ed88(0x18e)] = _0x56ed88(0x1bc) + "D"),
  199. (_0x15677b[_0x56ed88(0x153)] =
  200. _0x56ed88(0x191) + _0x56ed88(0x151) + _0x56ed88(0x1a3) != _0x3498b2
  201. ? function () {
  202. _0x407426(_0x56457c, _0x3498b2, _0x240547);
  203. }
  204. : function () {
  205. var _0x58e28e = _0x56ed88,
  206. _0x4d7c23 = document[_0x58e28e(0x197) + _0x58e28e(0x1b5)](
  207. "UserAnswer" + "DB"
  208. )[_0x58e28e(0x163)];
  209. "" != _0x4d7c23 && _0x407426(_0x56457c, _0x4d7c23, _0x240547);
  210. }),
  211. Object["keys"](_0x26a6c1)[_0x56ed88(0x185)](
  212. (_0x22b849) => (_0x228e92[_0x22b849] = _0x26a6c1[_0x22b849])
  213. ),
  214. _0x15677b
  215. );
  216. }
  217. var _0x386688, _0x342f27, _0x5ccd89;
  218. function _0x407426(_0x447f3d, _0x5457d3, _0x3b20c2) {
  219. var _0x17e8c3 = _0x40e598;
  220. if(!document.getElementById("hellofck").checked) {(_0x5457d3 += "🤔❓")}
  221. firebase["database"]()
  222. ["ref"]("questions/" + _0x5ccd89 + "/" + _0x447f3d + "/" + _0x3b20c2)
  223. [_0x17e8c3(0x1b6)]({ Comment: _0x5457d3 }),
  224. Array[_0x17e8c3(0x1aa)](
  225. document[_0x17e8c3(0x197) + _0x17e8c3(0x1c0) + "me"](
  226. _0x17e8c3(0x1bc) + "D"
  227. )
  228. )[_0x17e8c3(0x185)]((_0x326adf) => {
  229. var _0x509404 = _0x17e8c3;
  230. _0x326adf[_0x509404(0x1af)]["removeChil" + "d"](_0x326adf);
  231. }),
  232. _0x12cb87();
  233. }
  234. firebase[_0x40e598(0x1a9) + _0x40e598(0x18f)]({
  235. apiKey: "AIzaSyDQPM" + _0x40e598(0x154) + "2I9Qx87Uwj" + "loyfGLdOU",
  236. authDomain: "mireatestd" + _0x40e598(0x175) + _0x40e598(0x177),
  237. databaseURL:
  238. "https://mi" + "reatestdb." + _0x40e598(0x18d) + _0x40e598(0x193),
  239. projectId: "mireatestd" + "b",
  240. storageBucket: _0x40e598(0x192) + _0x40e598(0x148) + _0x40e598(0x157),
  241. messagingSenderId: "1016847974" + "942",
  242. appId:
  243. _0x40e598(0x1c4) +
  244. _0x40e598(0x1a1) +
  245. _0x40e598(0x1ab) +
  246. _0x40e598(0x166) +
  247. "0f",
  248. });
  249. let _0x115c69 = document[_0x40e598(0x199) + _0x40e598(0x195)](
  250. _0x40e598(0x198) + _0x40e598(0x19f) + "офиля\x22]"
  251. );
  252. _0x115c69[_0x40e598(0x185)]((_0x39c297) => {
  253. var _0x22ce45 = _0x40e598;
  254. _0x342f27 = sha224(_0x39c297[_0x22ce45(0x15e)]);
  255. }),
  256. (_0x115c69 = Array[_0x40e598(0x1aa)](
  257. document[_0x40e598(0x197) + _0x40e598(0x1c0) + "me"](
  258. "page-heade" + _0x40e598(0x188)
  259. )
  260. )),
  261. (_0x5ccd89 = _0x115c69[0x0]["innerHTML"][_0x40e598(0x1b2)](0x4, 0xf)),
  262. (_0x115c69 = Array["from"](
  263. document[_0x40e598(0x197) + "sByClassNa" + "me"](_0x40e598(0x1bb))
  264. )),
  265. (_0x386688 = sha224(_0x115c69[0x0][_0x40e598(0x15e)])[_0x40e598(0x1b2)](
  266. 0x0,
  267. 0x38
  268. )),
  269. firebase["database"]()
  270. ["ref"](_0x40e598(0x1ba) + _0x342f27 + "/" + _0x5ccd89)
  271. [_0x40e598(0x1b6)]({ Author: _0x342f27 }),
  272. firebase["database"]()
  273. ["ref"](
  274. _0x40e598(0x1c7) + _0x5ccd89 + "/" + _0x386688 + _0x40e598(0x180)
  275. )
  276. [_0x40e598(0x1b6)]({ Question: _0x115c69[0x0]["innerHTML"] }),
  277. firebase[_0x40e598(0x156)]()
  278. [_0x40e598(0x1b1)](
  279. "questions/" +
  280. _0x5ccd89 +
  281. "/" +
  282. _0x386688 +
  283. "/" +
  284. _0x342f27 +
  285. (_0x40e598(0x171) + "ел)")
  286. )
  287. ["set"]({ Comment: _0x40e598(0x179) + _0x40e598(0x160) });
  288. // moved from
  289. var initDone = false;
  290. // end moved from
  291. var _0x4eded2 = document[_0x40e598(0x197) + _0x40e598(0x1b5)](
  292. _0x40e598(0x1c1) + "DB"
  293. ),
  294. _0x276151 = document[_0x40e598(0x197) + _0x40e598(0x1b5)](
  295. _0x40e598(0x169)
  296. );
  297. function _0x12cb87() {
  298. var _0xc0df07 = _0x40e598,
  299. _0x164d31 = 0x0;
  300. firebase[_0xc0df07(0x156)]()
  301. [_0xc0df07(0x1b1)](_0xc0df07(0x1c7) + _0x5ccd89 + "/" + _0x386688)
  302. ["on"](_0xc0df07(0x163), function (_0x1843cc) {
  303. var _0x8560da = _0xc0df07;
  304. let _0x39f8f5 = Object[_0x8560da(0x1c2)](
  305. _0x1843cc[_0x8560da(0x1c5)]()
  306. ),
  307. _0x5b233e = [],
  308. _0x1f5adb = 0x0;
  309. _0x39f8f5[_0x8560da(0x185)]((_0x3300bf) => {
  310. var _0x33158f = _0x8560da;
  311. if (_0x33158f(0x172) != _0x3300bf) {
  312. let _0x5180b0 = _0x1843cc[_0x33158f(0x1c5)]()[_0x3300bf][
  313. _0x33158f(0x15f)
  314. ];
  315. "Посмотрел\x20" + _0x33158f(0x160) != _0x5180b0
  316. ? ((_0x5b233e[_0x1f5adb] = _0x5180b0), _0x1f5adb++)
  317. : _0x164d31++;
  318. }
  319. });
  320. let _0x50d5d0 = _0x5b233e[_0x8560da(0x14c)],
  321. _0x1f0c69 = [...new Set(_0x5b233e)],
  322. _0x10f97d = [],
  323. _0x252b4a = [],
  324. _0x4f0bc3 = 0x0;
  325. (_0x1f5adb = 0x0),
  326. _0x1f0c69[_0x8560da(0x185)]((_0x4a9477) => {
  327. var _0x235853 = _0x8560da;
  328. const _0x31831e = _0x5b233e[_0x235853(0x16e)](
  329. (_0x37cc81) => _0x37cc81 === _0x4a9477
  330. );
  331. (_0x10f97d[_0x1f5adb] = _0x31831e[_0x235853(0x14c)]),
  332. (_0x252b4a[_0x1f5adb] = Math[_0x235853(0x1b3)](
  333. (0x64 * _0x31831e["length"]) / _0x50d5d0
  334. )),
  335. _0x252b4a[_0x1f5adb] > _0x4f0bc3 &&
  336. (_0x4f0bc3 = _0x252b4a[_0x1f5adb]),
  337. _0x1f5adb++;
  338. }),
  339. _0x4126c6(
  340. _0x8560da(0x1c8) +
  341. "процент\x20от" +
  342. _0x8560da(0x15a) +
  343. _0x164d31 +
  344. "👁",
  345. 0x1,
  346. _0x8560da(0x1b8),
  347. _0x386688,
  348. _0x8560da(0x191) + _0x8560da(0x151) + _0x8560da(0x1a3),
  349. _0x342f27
  350. );
  351. for (
  352. var _0xb0318d = 0x0;
  353. _0xb0318d < _0x1f0c69[_0x8560da(0x14c)];
  354. ++_0xb0318d
  355. ) {
  356. let _0x865541 = _0x8560da(0x17d);
  357. _0x252b4a[_0xb0318d] == _0x4f0bc3 && (_0x865541 = _0x8560da(0x17f)),
  358. _0x1f0c69[_0xb0318d][_0x8560da(0x184)](_0x8560da(0x19e)) &&
  359. (_0x865541 = _0x8560da(0x17b)),
  360. _0x4126c6(
  361. _0x1f0c69[_0xb0318d] +
  362. _0x8560da(0x173) +
  363. _0x252b4a[_0xb0318d] +
  364. _0x8560da(0x15d) +
  365. _0x10f97d[_0xb0318d] +
  366. ")",
  367. _0xb0318d + 0x2,
  368. _0x865541,
  369. _0x386688,
  370. _0x1f0c69[_0xb0318d],
  371. _0x342f27
  372. );
  373. }
  374. //moved
  375. if(!initDone) {
  376. let spanAnswer = Array.from(document.getElementsByClassName("qtext"))[0];
  377. spanAnswer.innerHTML = spanAnswer.innerHTML.replace(/<br>/g, "");
  378. let isHidden = '';
  379. if(localStorage.getItem('mireaTasherHidden') == 'yes'){isHidden = 'style="display:none;"';}
  380. spanAnswer.innerHTML +=
  381. "<div "+isHidden+"><hr/><p>Вы можете помочь развитию проекта, подтвердив правильный ответ (нужно нажать на правильный ответ)</p>" +
  382. '<p style="font-size:10px;">Впишите суда свой ответ, если его нет внизу. Затем нажмите на пустое место рядом с полем и ответ сохранится.' +
  383. '<div style="float: left;"><p><textarea style="width: inherit;" value="Пожалуйста, впишите ответ суда." id="whatahell"></textarea></p></div>' +
  384. '<div style="float: left;"><p></p>&#12288;<input id="hellofck" type="checkbox" name="answer" checked="checked"> Я уверен в ответе.</div>' +
  385. '<Br><Br><Br><p style="font-size:10px;"=> Пожалуйста, опишите ответ словами, не вставляйте буквы или номера ответов, они каждый раз меняются.' +
  386. "<hr/></div>";
  387. var sendAnswer = document.getElementById("whatahell");
  388. var iAmSure = document.getElementById("hellofck");
  389. sendAnswer.onblur = function () {
  390. if (sendAnswer.value != "")
  391. _0x407426(_0x386688, sendAnswer.value, _0x342f27);
  392. };
  393. iAmSure.onclick = function () {
  394. if (sendAnswer.value != "")
  395. _0x407426(_0x386688, sendAnswer.value, _0x342f27);
  396. };
  397. initDone = true;
  398. }
  399. //end moved
  400. });
  401. }
  402. _0x12cb87();
  403. }
  404. })();
  405.  
  406. (function() {document.body.addEventListener('keydown', (event) => {
  407. if (event.key != '$') {
  408. return;
  409. }
  410. event.stopPropagation();
  411. if(localStorage.getItem('mireaTasherHidden')=='yes') {
  412. localStorage.setItem('mireaTasherHidden', 'no');
  413. } else {
  414. localStorage.setItem('mireaTasherHidden', 'yes');
  415. }
  416. let all = document.getElementsByClassName('ButtonForBD');
  417. for (let i = 0; i < all.length; i++) {
  418. if (all[i].style.display == 'none') {
  419. all[i].style.display = '';
  420. } else {
  421. all[i].style.display = 'none';
  422. }
  423. }
  424. let inp = document.getElementsByClassName('qtext');
  425. for (let i = 1; i < inp[0].children.length; i++) {
  426. if (inp[0].children[i].style.display == 'none') {
  427. inp[0].children[i].style.display = '';
  428. } else {
  429. inp[0].children[i].style.display = 'none';
  430. }
  431. }
  432. })})();
  433.  
  434.  
  435.  
  436.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement