diff --git a/README.md b/README.md index aa5661b2..195976e2 100644 --- a/README.md +++ b/README.md @@ -26,16 +26,16 @@ To develop ArchiveWeb.page, Node 12+ and Yarn are needed. The production version of the extension is published to the [Chrome Web Store](https://chrome.google.com/webstore/detail/webrecorder/fpeoodllldobpkbkabpblcfaogecpndd) -For development, the extension can be installed from the `wr-ext` directory as an unpacked extension. -If you want to make changes to the extension, it should be installed in this way. This will be a different version than the production version of the extension. +For development, the extension can be built locally and loaded as an unpacked extension. +If you want to make changes to the extension, it should be installed in this way. -1. Clone this repo +1. Clone this repo. Run `yarn install; yarn build-dev`. (You can also run `yarn build` to build the production version but it may be harder to debug). -2. Open the Chrome Extensions page (chrome://extensions). +3. Open the Chrome Extensions page (chrome://extensions). -3. Choose 'Load Unpacked Extension' and point to the `./wr-ext` directory in your local copy of this repo. +4. Choose 'Load Unpacked Extension' and point to the `./dist/ext` directory in your local copy of this repo. -4. Click the extension icon to show the extension popup, start recording, etc... +5. Click the extension icon to show the extension popup, start archiving, etc... ### Development Workflow @@ -43,7 +43,7 @@ For development, it is recommended to use the dev build of the extension: 1. Run ``yarn install`` and then ``yarn run build-dev`` -2. Run ``yarn run start-ext`` -- this will ensure the `wr-ext` directory is rebuilt after any changes to the source. +2. Run ``yarn run start-ext`` -- this will ensure the `dist/ext` directory is rebuilt after any changes to the source. 3. After making changes, the extension still needs to be reloaded in the browser. From the Chrome extensions page, click the reload button to load the latest version. diff --git a/dist/.gitignore b/dist/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/dist/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/dist/embed/index.html b/dist/embed/index.html index 64ed0d54..e2646c18 100644 --- a/dist/embed/index.html +++ b/dist/embed/index.html @@ -3,9 +3,18 @@
diff --git a/dist/embed/replay/sw.js b/dist/embed/replay/sw.js deleted file mode 100644 index 87c63a8b..00000000 --- a/dist/embed/replay/sw.js +++ /dev/null @@ -1,122 +0,0 @@ -/*! sw.js is part of the Webrecorder ArchiveWeb.page (https://archiveweb.page) Copyright (C) 2020-2024, Webrecorder Software. Licensed under the Affero General Public License v3. */(()=>{var __webpack_modules__={8045:t=>{"use strict";t.exports=function(t,e){var r=new Array(arguments.length-1),i=0,n=2,s=!0;for(;n0;++f){var b,A=d[f],v=0;i.fillBitWindow(),v+=i.val_>>>i.bit_pos_&15,i.bit_pos_+=m[v].bits,b=m[v].value,g[A]=b,0!==b&&(y-=32>>b,++w)}if(1!==w&&0!==y)throw new Error("[ReadHuffmanCode] invalid num_codes or space");!function(t,e,r,i){for(var n=0,s=8,o=0,l=0,h=32768,u=[],p=0;p<32;p++)u.push(new a(0,0));for(c(u,0,5,t,18);n =t)throw new Error("[DecodeContextMap] i >= context_map_size");c[i]=0,++i}else c[i]=l-s,++i}return e.readBits(1)&&function(t,e){var r,i=new Uint8Array(256);for(r=0;r<256;++r)i[r]=r;for(r=0;rt.length)throw new RangeError("Index out of range")}function D(t,e,r,i,n){j(e,i,n,t,r,7);let s=Number(e&BigInt(4294967295));t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function P(t,e,r,i,n){j(e,i,n,t,r,7);let s=Number(e&BigInt(4294967295));t[r+7]=s,s>>=8,t[r+6]=s,s>>=8,t[r+5]=s,s>>=8,t[r+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function L(t,e,r,i,n,s){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,i,s){return e=+e,r>>>=0,s||L(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function M(t,e,r,i,s){return e=+e,r>>>=0,s||L(t,0,r,8),n.write(t,e,r,i,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e{"use strict";var e,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var n=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(r,i){function n(r){t.removeListener(e,s),i(r)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",n),r([].slice.call(arguments))}g(t,e,s,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&g(t,"error",e,r)}(t,n,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,r,i){var n,s,o,l;if(a(r),void 0===(s=t._events)?(s=t._events=Object.create(null),t._eventsCount=0):(void 0!==s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),o=s[e]),void 0===o)o=s[e]=r,++t._eventsCount;else if("function"==typeof o?o=s[e]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),(n=c(t))>0&&o.length>n&&!o.warned){o.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=o.length,l=h,console&&console.warn&&console.warn(l)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=h.bind(i);return n.listener=r,i.wrapFn=n,n}function p(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r=3&&0===t.bl_tree[2*p[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=n&&(n=o)):n=o=r+5,r+4<=n&&-1!==e?F(t,e,r,i):4===t.strategy||o===n?(x(t,2+(i?1:0),3),D(t,d,f)):(x(t,4+(i?1:0),3),function(t,e,r,i){var n;for(x(t,e-257,5),x(t,r-1,5),x(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(y[r]+s+1)]++,t.dyn_dtree[2*S(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){x(t,2,3),C(t,256,d),function(t){16===t.bi_valid?(I(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},4442:t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},5606:t=>{var e,r,i=t.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var a,c=[],l=!1,h=-1;function u(){l&&a&&(l=!1,a.length?c=a.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=o(u);l=!0;for(var e=c.length;e;){for(a=c,c=[];++h