diff --git a/README.md b/README.md index 768d245..a2521e2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ ANY TEXTBOOKS YOU DOWNLOAD USING THIS SCRIPT.** 1. Open your textbook in the McGraw-Hill Connect website (how you normally open it) 2. Type `javascript:` into the address bar (you can't paste it in). 2. Paste the following into the address bar AFTER the `javascript:` part: -`var x=new XMLHttpRequest();x.onload=function(){eval(x.responseText)};x.open('GET','https://gist.githubusercontent.com/101arrowz/88156556326106a6ccd58ecb4526498c/raw/script.js');x.send(); -` +```js +var x=new XMLHttpRequest();x.onload=function(){eval(x.responseText)};x.open('GET','https://gist.githubusercontent.com/101arrowz/88156556326106a6ccd58ecb4526498c/raw/script.js');x.send(); +``` 3. Follow the instructions that pop up. Be patient! 4. Your textbook will download. \ No newline at end of file diff --git a/script.js b/script.js index 7d284cd..8b04dec 100644 --- a/script.js +++ b/script.js @@ -6,5 +6,5 @@ var t=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="fu },{}],"EM64":[function(require,module,exports) { "use strict";var e=t(require("../src/index.mjs"));function t(e){return e&&e.__esModule?e:{default:e}}self.fetch||(self.fetch=e.default); },{"../src/index.mjs":"vsCR"}],"Focm":[function(require,module,exports) { -"use strict";function e(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=t(e))){var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a,c=!0,i=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==o.return||o.return()}finally{if(i)throw a}}}}function t(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);np&&(console.log(n+"% complete"),p=n)});case 58:h=t.sent,alert("Finished compressing textbook! Click OK to start download."),window.__savedTextbookEpub=h,m=URL.createObjectURL(h),(v=document.createElement("a")).href=m,b=i.querySelector("metadata title"),x=b?b.innerHTML:"textbook",v.download=x+".epub",v.click(),URL.revokeObjectURL(m),t.next=74;break;case 71:t.prev=71,t.t4=t.catch(0),alert("Textbook download failed because an error occurred: "+t.t4);case 74:case"end":return t.stop()}},t,null,[[0,71],[25,47,50,53],[30,40]])}));return function(){return t.apply(this,arguments)}}();c(); +"use strict";function e(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=t(e))){var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a,c=!0,i=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==o.return||o.return()}finally{if(i)throw a}}}}function t(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);np&&(console.log(n+"% complete"),p=n)});case 58:m=t.sent,alert("Finished compressing textbook! Click OK to start download."),window.__savedTextbookEpub=m,h=URL.createObjectURL(m),(v=document.createElement("a")).href=h,b=i.querySelector("metadata title"),x=b?b.innerHTML:"textbook",v.download=x+".epub",v.click(),URL.revokeObjectURL(h),t.next=74;break;case 71:t.prev=71,t.t4=t.catch(0),alert("Textbook download failed because an error occurred: "+t.t4);case 74:case"end":return t.stop()}},t,null,[[0,71],[25,47,50,53],[30,40]])}));return function(){return t.apply(this,arguments)}}();c(); },{"regenerator-runtime/runtime":"KA2S","unfetch/polyfill":"EM64"}]},{},["Focm"], null) \ No newline at end of file