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

Function floatClick

src/floatbutton/userscript.ts:56–75  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

54}
55
56export function floatClick(page) {
57 if (api.settings.get('floatButtonCorrection')) {
58 con.log('Open correction');
59 page.openCorrectionUi();
60 } else {
61 con.log('Open miniMAL');
62 if (j.$('#info-popup').css('display') === 'none') {
63 document.getElementById('info-popup')!.style.display = 'block';
64 hideFloatbutton(true);
65 if (!j.$('#info-iframe').length) {
66 createIframe(page);
67 } else if (typeof minimalObj !== 'undefined' && typeof page.singleObj !== 'undefined') {
68 minimalObj.fill({ url: page.singleObj.getUrl() }, true);
69 }
70 } else {
71 document.getElementById('info-popup')!.style.display = 'none';
72 showFloatbutton();
73 }
74 }
75}
76
77export function importAssets(head) {
78 api.storage.injectCssResource(

Callers

nothing calls this directly

Calls 7

hideFloatbuttonFunction · 0.90
showFloatbuttonFunction · 0.90
createIframeFunction · 0.85
openCorrectionUiMethod · 0.80
fillMethod · 0.80
getMethod · 0.65
getUrlMethod · 0.45

Tested by

no test coverage detected