diffenator2 icon indicating copy to clipboard operation
diffenator2 copied to clipboard

Adding autoSwitch for diff browsers proofer

Open juandelperal opened this issue 2 years ago • 5 comments

This enables the automatic switching of fonts (new vs old) every 1.25 secs. This helps to compare the versions without clicking all the time.

If the user clicks the old/new button, then the switching stops.

Demo: ScreenRecording2024-01-30at11 39 00-ezgif com-video-to-gif-converter

PS. I couldn't test it compiles the HTML properly, just added the snippets in the template

juandelperal avatar Jan 30 '24 10:01 juandelperal

Sorry for not looking at this sooner.

m4rc1e avatar Feb 13 '24 12:02 m4rc1e

Love It! Once ci passes, I'll merge.

m4rc1e avatar Feb 13 '24 12:02 m4rc1e

Seems the toggle has been broken for the other pages. I get the following traceback if I open up a page other than proofer.html

Uncaught ReferenceError: autoSwitch is not defined
    at HTMLDivElement.switchFonts (Black-Bold-ExtraBold-Medium-diffbrowsers_waterfall.html:638:25)

Since I like the feature, I don't mind fixing this but it may take me a while to get round to it.

m4rc1e avatar Feb 13 '24 12:02 m4rc1e

Nice! I can help with it. How do I build or run tests locally?

juandelperal avatar Feb 13 '24 13:02 juandelperal

I (blindly) added a possible fix, but I cant generate the HTMLs properly I tried using python src/diffenator2/__main__.py diff -fb ...

but it seems that I'm getting a cached version, as the generated htmls don't show the changes I am trying

juandelperal avatar Feb 13 '24 16:02 juandelperal