Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/plugins/multi/komga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class KomgaPlugin implements Plugin.PluginBase {
id = 'komga';
name = 'Komga';
icon = 'src/multi/komga/icon.png';
version = '1.0.0';
version = '1.0.1';

site = storage.get('url');
email = storage.get('email');
Expand Down Expand Up @@ -214,6 +214,11 @@ class KomgaPlugin implements Plugin.PluginBase {
}
});

// Replace <a> tags with the text inside so its not blue
$('a').each((_, a) => {
$(a).replaceWith($(a).text());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use plugin custom css instead

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk if that would be better tbh should links even exist in reader

cus u just click on them and the reader gets screwed up
(also most of the a tags in komga shouldent even be detected, in the response they are self closing but html doesent support self closing a tags so the tag just contains the entire rest of the chapter content

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image heres an example

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*self closing tags should be valid btw as the html document is in XML mode that does support self closing tags (hence why the links arent there in browser) but the html parser used doesent seem to support it, even tho its in xml mode

    const $ = parseHTML(htmlString, { xmlMode: true });

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe that does support but cus its also outputting in xml the reader view cant show it cus reader view doesent have the html doctype thing to put it in xml mode

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*there are some properly formatted links sometimes like chapter titles sometimes link back to table of contents, and toc has links ect. but IMO having them be actuall links just makes the reader experience worse cus that is not how you should be navigating the novel (if it even works)

});

return $.xml();
}

Expand Down