billy-herrington-utils 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "billy-herrington-utils",
3
3
  "description": "daddy told us not to be ashamed of our utils",
4
- "version": "1.3.4",
4
+ "version": "1.3.5",
5
5
  "license": "MIT",
6
6
  "keywords": ["utils", "observer", "dom", "fetch", "arrays", "typescript"],
7
7
  "author": "smartacephale atm.mormon@protonmail.com (https://github.com/smartacephale)",
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ export { MOBILE_UA, fetchHtml, fetchText, fetchWith, objectToFormData } from './
6
6
  export { Tick, listenEvents } from './utils/events';
7
7
  export {
8
8
  parseDom,
9
+ exterminateVideo,
9
10
  copyAttributes,
10
11
  downloader,
11
12
  findNextSibling,
@@ -99,4 +99,10 @@ export function downloader(options = { append: "", after: "", button: "", cbBefo
99
99
  window.location.href = video.getAttribute('src') as string;
100
100
  });
101
101
  });
102
+ }
103
+
104
+ export function exterminateVideo(video: HTMLVideoElement) {
105
+ video.removeAttribute('src');
106
+ video.load();
107
+ video.remove();
102
108
  }
@@ -12,6 +12,9 @@ export function createInfiniteScroller(
12
12
  handleHtmlCallback: (document: HTMLElement) => void,
13
13
  rules: RulesHelper,
14
14
  ) {
15
+ //@ts-ignore
16
+ if (!store.localState) store.localState = store.stateLocale;
17
+
15
18
  const enabled = store.state.infiniteScrollEnabled as boolean;
16
19
  const iscroller = new InfiniteScroller({
17
20
  enabled,
@@ -202,10 +202,10 @@ export class RulesHelper {
202
202
  // ),
203
203
  // CONTAINER: '.listing-container',
204
204
 
205
- // /*
206
- // PARSE LINKS AND PAGINATION FOR IT!!!!
205
+ /*
206
+ PARSE LINKS AND PAGINATION FOR IT!!!!
207
207
 
208
- // */
208
+ */
209
209
 
210
210
 
211
211
  // URL_DATA() {
@@ -268,4 +268,5 @@ export class RulesHelper {
268
268
  // ),
269
269
  // CONTAINER: ".index-container, .container",
270
270
  // router: () => {}
271
- // })
271
+ // }}
272
+ //