Greasy Fork is available in English.

Image Viewer

View full image without leaving the page or on a new tab without ads

< Feedback on Image Viewer

Review: OK - script works, but has bugs

§
Posted: 2022/09/16

some fix


id: 'imagevenue,',


const fastpic = {
id: 'fastpic',
name: 'FastPic',
linkRegExp: /fastpic\.(?:ru|org)\/view/,
imageURLRegExp: /src="(?http[^"]+)" class="image img-fluid"/,
getURL: getURLFromPage,
}


const URL_PARTS_REGEXP = /i(\d+).+\.(ru|org)\/big(\/\d+\/\d+\/).+\/([^/]+)$/
to
const URL_PARTS_REGEXP = /i(\d+).+\.(ru|org)\/big(\/\d+\/\d+\/).+\/([^\/]+)$/


ImageTwist some link include jpeg.html link extension length 4 image extension length 3
this changed xxx.jpeg to xxxjpeg

const imagetwist = {
id: 'imagetwist',
name: 'ImageTwist',
linkRegExp: /imagetwist\.com/,
viewMode: 'origin-download',

async getURL(link) {
const imageName = link.url.split('/').pop()?.replace('.html', '')
const extension = imageName?.split('.').pop() ?? ''
const imageUrl = link.thumbnailURL
.replace('/th/', '/i/')
.slice(0, -extension.length)


to

const imageName = link.split('/').pop()?.replace('.html', '')
const extension = imageName?.split('.').pop() ?? ''
const srcextension = src?.split('.').pop() ?? ''
//console.log(imageName, extension)
const imageUrl = src
.replace('/th/', '/i/')
.slice(0, -srcextension.length)




how can change this script showInViewer to https://github.com/fengyuanchen/viewerjs


please a not only img gallery support

§
Posted: 2022/09/25

Thank you for feedback and the fixes! To use another viewer you need to modify image-viewer/viewer.js

Post reply

Sign in to post a reply.