Helpt aroud getting high resoltion pics
better left alone...
hin, hin...
Great help!
:-)
hin, hin...
Great help!
:-)
sorry but the code was messy, and the outcome wasn't dealbreaking thus "better left alone"...
sorry but the code was messy, and the outcome wasn't dealbreaking thus "better left alone"...
Ok ;-)
The help asked was around to how change the background image of "low" to "hight" resolution by userscript.
Here for Babelio, but might be for others sites.
I am not programmer as you can see :-)
This is a cool game and if you play it with your friends, you'll have a lot of fun.
Spam ?
I try to change the low resolution pics of book in Babelio site to high.
I can do it for most of them i can find.
My request A:
How to write my code to revert to the original low pic if the Big one is invalid (on error) ?
That's because some low pics don't obey to the "general" structure and fail (and give the default pic of book).
My request B:
How continue to change the resolution when i use the pagination (without refreshing the page)?
Here an example where my problem is visible:
TEST link:
Science-Fiction [Babelio - Liste]
And my test code:
// ==UserScript==
// @name BABELIO - HI-RES Pics TEST - v.1
// @description Higher resolution COUV
// @version 1.0
// @author decembre
// @namespace https://greasyfork.org/fr/users/8-decembre
// @icon https://external-content.duckduckgo.com/ip3/www.babelio.com.ico
// @include https://www.babelio.com/*
// @license unlicense
// ==/UserScript==
// BABELOI SMALL
// https://www.babelio.com/couv/sm_12511_676643.jpg
// AMAZON
// https://images-eu.ssl-images-amazon.com/images/I/515CGKogOvL._SX95_.jpg
// https://images-na.ssl-images-amazon.com/images/I/51w6uK31m0L._SX95_.jpg
// BABELIO BIG COUV
// https://www.babelio.com/couv/CVT_12511_676643.jpg
// AMAZON
//https://images-eu.ssl-images-amazon.com/images/I/51kx5uEMiGL._SX210_.jpg
/*
$('.floatingElementsContainer.d-flex.flex-wrap .photo-element').attr('src', function(i, val) {
return val.replace('/images/thumbs/85x85/', '/images/')
});
*/
// IN RECOMMANDATIONS .side_l_content .bloc_livre .couv3
$('.side_l_content .bloc_livre .couv3').attr('src', function(i, val) {
return val.replace('/couv/sm_', '/couv/CVT_')
});
$('td.visuel .couv_fixe').attr('src', function(i, val) {
return val.replace('/couv/sm_', '/couv/CVT_')
});
// IN LEFT PANEL .list_livre_con .list_livre>a>img
$('.list_livre_con .list_livre>a>img').attr('src', function(i, val) {
return val.replace('/couv/sm_', '/couv/CVT_')
});
// IN TAG PAGE .list_livre_con .list_livre>a>img
$('.list_livre_con .list_livre>a>img').attr('src', function(i, val) {
return val.replace('/couv/sm_', '/couv/CVT_')
});
$('.list_livre_con .list_livre>a>img').attr('src', function(i, val) {
return val.replace('/couv/cvt_', '/couv/CVT_')
});
$('.list_livre_con .list_livre>a>img').attr('src', function(i, val) {
return val.replace('_SX95_', '_SX210_')
});
// AMAZON
/*
$('.side_l_content .bloc_livre .couv3').attr('src', function(i, val) {
return val.replace('_SX95_', '_SX210_')
});
*/
// add CSS