flat assembler
Message board for the users of flat assembler.

Index > Tutorials and Examples > Intro to x86 Assembly with FASM

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20513
Location: In your JS exploiting you and your system
revolution 19 Sep 2016, 10:42
I wonder if it is possible to turn off that behaviour?
Post 19 Sep 2016, 10:42
View user's profile Send private message Visit poster's website Reply with quote
brakmic



Joined: 28 Aug 2016
Posts: 10
Location: Germany
brakmic 19 Sep 2016, 10:47
I don't think this would be possible without great risks of breaking other parts of the site. JavaScript is pervasive these days. However, in future I'll always generate a PDF file for all of you who don't like (or can't use) JavaScript. I think this is much better than trying to tweak things I don't know for sure. I'm not an experienced user of Wordpress. Just using it as a vehicle to spread my articles. Smile

Regards,
Post 19 Sep 2016, 10:47
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20513
Location: In your JS exploiting you and your system
revolution 19 Sep 2016, 11:00
Thanks for considering the non-JS people.
Post 19 Sep 2016, 11:00
View user's profile Send private message Visit poster's website Reply with quote
chimbos



Joined: 14 Jan 2016
Posts: 1
chimbos 29 Oct 2016, 12:20
ExitProcess argument might have been popped
Post 29 Oct 2016, 12:20
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 676
Location: Mar del Plata
Enko 10 May 2017, 19:20
revolution wrote:
I wonder if it is possible to turn off that behaviour?


revolution it is possible indeed.
The issue: some wordpress templates are prepared to serve images depending on your screen pixel ratio. In the sense of if you have a device with pixel ratio 2:1 it will show you a bigger image so that it looks smoother.

In the case of wordpress it is done with wp_get_attachment_image(). This will generate the img tag with blank image and data-src with different images. Later on some javascript will set the src attribute of the image to something "suitable" for your device.
But if you use something like this you assure that there would be an image set.
Quote:

<img src="<?=wp_get_attachment_image_src( int $attachment_id, string|array $size = 'thumbnail');?>" class="" alt="">


The script should set a default image and then later on switch it to something else. Then again, probably it was done to save bandwidth. Then once more again... it is silly that a bloated javascript tries to preserve bandwidth.

It is as risky as having a dynamic webpage depending on a database. Condompress is updated regulary to patch all the vulnerabilities and making the browsing a safe experience for everybody.


Best regards
^^

Edit, just for the curious once, here is the javascript responsable for the update
it takes as a parameter the img node and then changes
Code:
function updateImage( imageNode, imageData ) {
        /**
         * bla bla bla bla bla.....................
         */
         srcset = $imageNode.attr( 'srcset' );
         src = $imageNode.attr( 'src' );

        // Remove srcset and sizes if the image file was edited or the image was replaced.
        if ( srcset && src ) {
                src = src.replace( /[?#].*/, '' );

                if ( srcset.indexOf( src ) === -1 ) {
                        $imageNode.attr( 'srcset', null ).attr( 'sizes', null );
                }
        }

        /**
         * bla bla bla bla bla.....................
         */
}
    
Post 10 May 2017, 19:20
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.