Skip to content

Commit

Permalink
Remove excessive debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenlx committed Apr 6, 2021
1 parent f944d08 commit 1e4f769
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ function setOption(
.addToggle(toggle => toggle
.setValue(tab.plugin.settings[k])
.onChange(async (value) => {
console.log("changeTO:"+value);
console.log("saved:"+tab.plugin.settings[k])
tab.plugin.settings[k] = value;
tab.plugin.saveData(tab.plugin.settings);
tab.display();
Expand Down
7 changes: 0 additions & 7 deletions src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export function processInternalLinks(this: MediaExtended, el:HTMLElement, ctx:Ma
case "video":
case "audio":
const filePath = viewState.state.file
console.log(filePath+";"+pathname);
if (filePath && (filePath as string)?.contains(pathname)) {
openedMedia.push((l.view as FileView).contentEl);
}
Expand All @@ -62,7 +61,6 @@ export function processInternalLinks(this: MediaExtended, el:HTMLElement, ctx:Ma
} else {
let file = plugin.app.metadataCache.getFirstLinkpathDest(pathname,ctx.sourcePath);
let fileLeaf = workspace.createLeafBySplit(workspace.activeLeaf);
console.log(file);
fileLeaf.openFile(file).then(()=>{
const player = (fileLeaf.view as FileView).contentEl.querySelector(
"div.video-container > video, div.video-container > audio"
Expand All @@ -86,7 +84,6 @@ export function processInternalLinks(this: MediaExtended, el:HTMLElement, ctx:Ma
}
)
for (const link of el.querySelectorAll("a.internal-link")) {
console.log(link)
internalLinkObs.observe(link, { attributeFilter: ["class"] });
}
}
Expand Down Expand Up @@ -172,9 +169,7 @@ export function processInternalEmbeds(/* this: MediaExtended, */el:HTMLElement,
};

export function processExternalEmbeds(el:HTMLElement, ctx:MarkdownPostProcessorContext) {
console.log(el.innerHTML);
for (const e of el.querySelectorAll("img[referrerpolicy]")) {
console.log(e.outerHTML);
const srcEl = e as HTMLImageElement;
const ext = new URL(srcEl.src).pathname.split(".").last();

Expand All @@ -190,9 +185,7 @@ export function processExternalEmbeds(el:HTMLElement, ctx:MarkdownPostProcessorC
default:
type = null;
}
console.log(ext);
if (type) {
console.log('hello');
newEl = createEl(type);
newEl.src = srcEl.src;
newEl.controls = true;
Expand Down

0 comments on commit 1e4f769

Please sign in to comment.