More URL support

This commit is contained in:
Mr. Stallion 2019-06-23 16:48:41 -05:00
parent 7bdf9d815a
commit a78deb2811
3 changed files with 12 additions and 6 deletions

View File

@ -248,7 +248,7 @@
.image-preview-external {
position: absolute;
width: 50%;
height: 50%;
height: 70%;
top: 0;
left: 0;
pointer-events: none;
@ -258,7 +258,7 @@
.image-preview-local {
position: absolute;
width: 50%;
height: 50%;
height: 70%;
top: 0;
left: 0;
pointer-events: none;

View File

@ -23,8 +23,9 @@ export class ImagePreviewMutator {
const mutatorJs = this.mutators[urlDomain];
if (!mutatorJs)
return;
if (!mutatorJs) {
return this.mutators['default'];
}
return `(() => { try { ${mutatorJs} } catch (err) { console.error(err); } })()`;
}
@ -34,6 +35,7 @@ export class ImagePreviewMutator {
}
protected init() {
this.add('default', this.getBaseJsMutatorScript('#image, #video, img, video'));
this.add('e621.net', this.getBaseJsMutatorScript('#image, video'));
this.add('e-hentai.org', this.getBaseJsMutatorScript('#img, video'));
this.add('gelbooru.com', this.getBaseJsMutatorScript('#image, video'));
@ -42,6 +44,8 @@ export class ImagePreviewMutator {
this.add('gfycat.com', this.getBaseJsMutatorScript('video'));
this.add('gfycatporn.com', this.getBaseJsMutatorScript('video'));
this.add('www.youtube.com', this.getBaseJsMutatorScript('video'));
this.add('instantfap.com', this.getBaseJsMutatorScript('#post img, #post video'));
this.add('www.webmshare.com', this.getBaseJsMutatorScript('video'));
// this fixes videos only -- images are fine as is
this.add('i.imgur.com', this.getBaseJsMutatorScript('video'));

View File

@ -13,13 +13,15 @@ This repository contains a modified version of the mainline F-Chat 3.0 client.
* Hover cursor over any `[url]` to see a preview of it
* Profile
* Kinks are auto-compared when profile is loaded
* Custom kink explanations are shown inline
* Custom kink explanations can be expanded inline
* Custom kinks are highlighted
* Gender, fur/human status, age, and sexual preference are highlighted if compatible or incompatible
* Guestbook, friend, and group counts are visible on tabs
* Character pictures can be expanded inline
* Character pictures are expanded inline
* Cleaner presentation for the side bar details (age, etc.), sorted in most relevant order
* Less informative side bar details (views, contact) are separated and shown in a less prominent way
* Cleaner guestbook view
* Link previews