MCPcopy Index your code
hub / github.com/MALSync/MALSync / constructor

Method constructor

src/pages-sync/syncPage.ts:47–71  ·  view source on GitHub ↗
(
    public url,
    public pages,
    protected floatClick: any = () => {
      throw 'No click handling found';
    },
  )

Source from the content-addressed store, hash-verified

45 public strongVolumes = false;
46
47 constructor(
48 public url,
49 public pages,
50 protected floatClick: any = () => {
51 throw 'No click handling found';
52 },
53 ) {
54 this.page = this.getPage(url);
55 if (this.page === null) {
56 throw new Error('Page could not be recognized');
57 }
58 this.domainSet();
59 logger.log('Page', this.page.name);
60 if (
61 !(
62 typeof api.settings.get('enablePages')[this.page.name] === 'undefined' ||
63 api.settings.get('enablePages')[this.page.name]
64 )
65 ) {
66 logger.info('Sync is disabled for this page', this.page.name);
67 throw 'Stop Script';
68 }
69
70 emitter.on('syncPage_fillUi', () => this.fillUI());
71 }
72
73 init() {
74 const This = this;

Callers

nothing calls this directly

Calls 6

getPageMethod · 0.95
domainSetMethod · 0.95
fillUIMethod · 0.95
onMethod · 0.80
getMethod · 0.65
infoMethod · 0.45

Tested by

no test coverage detected