athinorama.gr - content overlap/scrolling issue Topic is solved

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2900
Joined: 2012-08-19, 20:32

athinorama.gr - content overlap/scrolling issue

Post by back2themoon » 2025-06-19, 13:57

Hello,

Visit: https://www.athinorama.gr/cinema/movie/ ... -10086372/

(if you get the "Σεβόμαστε την ιδιωτικότητά σας" Privacy prompt, click the middle, disagree button at the bottom)

Scroll a bit down, and click on the indicated section to expand/reveal it:
ath1.png
This issue does not always occur, but it usually does. There's a horizontal bar (indicated) which is supposed to stay above the content while scrolling, but it doesn't and thus overlaps with the content:
ath2.png
Also, the bottom section of the page appears somewhere in the middle, while scrolling:
ath3.png
These are often solved with a simple page refresh. Until the next time!

Can't see anything in Developers Tools/Error Console, but I think there's more to check in F12/Console? Please remind me where to look for more.
You do not have the required permissions to view the files attached to this post.

Goodydino
Keeps coming back
Keeps coming back
Posts: 905
Joined: 2017-10-10, 21:20

Re: athinorama.gr - content overlap/scrolling issue

Post by Goodydino » 2025-06-19, 14:51

The whole page looks normal to me.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2417
Joined: 2018-05-05, 13:29

Re: athinorama.gr - content overlap/scrolling issue

Post by vannilla » 2025-06-19, 15:20

It seems to work correctly on my machine, even after multiple attempts.
I tried with a maximized window, with a narrow window at various widths and I even changed the minimum text size. Still could not replicate your issue.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2900
Joined: 2012-08-19, 20:32

Re: athinorama.gr - content overlap/scrolling issue

Post by back2themoon » 2025-06-19, 16:36

Ok, thanks for looking. This is strange, it's quite consistent here. Remember, you need to click on that first yellow button/tab, which links to:

https://www.athinorama.gr/cinema/movie/ ... xCall=True

...but isn't really meant as a direct link.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2417
Joined: 2018-05-05, 13:29

Re: athinorama.gr - content overlap/scrolling issue

Post by vannilla » 2025-06-19, 17:21

Yes, I did open it and scrolled up and down multiple times, fast and slow.
Maybe it's something about fonts? The developer toolbox tells me it's meant to be "Apercu-Pro".

User avatar
tellu-white
Fanatic
Fanatic
Posts: 199
Joined: 2022-03-08, 22:02

Re: athinorama.gr - content overlap/scrolling issue

Post by tellu-white » 2025-06-19, 21:52

back2themoon wrote:
2025-06-19, 13:57
There's a horizontal bar which is supposed to stay above the content while scrolling, but it doesn't and thus overlaps with the content.
Also, the bottom section of the page appears somewhere in the middle, while scrolling.
It seems that the problem is created by some code in the Javasscript file with the following URL:

https://cdn.jsdelivr.net/npm/add-to-calendar-button@2

Code: Select all

/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/add-to-calendar-button@2.9.1/dist/atcb.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
The problem disappeared after using the Intercept & Modify HTTP Response 4.3 add-on with the following filter:

Code: Select all

[`/cdn.jsdelivr.net/`, `/\/npm\/add-to-calendar-button.*/`, [`/.*/`, ``]]

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2900
Joined: 2012-08-19, 20:32

Re: athinorama.gr - content overlap/scrolling issue

Post by back2themoon » 2025-06-19, 22:22

Thank you, tellu-white. I couldn't reproduce the issue again on that page. However, the issue re-appears when selecting a different film, for example:

https://www.athinorama.gr/cinema/movie/ ... -10086524/

User avatar
tellu-white
Fanatic
Fanatic
Posts: 199
Joined: 2022-03-08, 22:02

Re: athinorama.gr - content overlap/scrolling issue

Post by tellu-white » 2025-06-19, 23:08

back2themoon wrote:
2025-06-19, 22:22
Thank you, tellu-white. I couldn't reproduce the issue again on that page. However, the issue re-appears when selecting a different film, for example:

https://www.athinorama.gr/cinema/movie/ ... -10086524/
Indeed, the filter no longer works with the new link. But I noticed something interesting. I made a "Custom Button" with the add-on Custom Buttons 0.0.5.5.8.9.6 with the following code (in the "Code" TAB):

Code: Select all

var arr_img = content.document.getElementsByTagName("img");

function IsNumeric(n) {
	return !isNaN(parseFloat(n)) && isFinite(n);
}

for(var i=0; i < arr_img.length; i++){
	try{
		var height = arr_img[i].height;
		
		if(IsNumeric(height)){
			arr_img[i].height = height - 1;
			arr_img[i].height = height;
		}
		
	}catch(err){
		// alert(err.message);
	}
}
After the problem appeared, I clicked on "Custom Button" and the problem disappeared. It seems to be a problem with the "height" attribute. The code in the button decreases the "height" by one pixel and then restores it to the original "height". This seems to reset the "height" attribute and the problem disappears.

1. Button with the code above:
01.png
2. Problem before clicking on the button:
02.png
3. Problem solved after clicking the button:
03.png
You do not have the required permissions to view the files attached to this post.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2900
Joined: 2012-08-19, 20:32

Re: athinorama.gr - content overlap/scrolling issue

Post by back2themoon » 2025-06-20, 07:57

Many thanks for your efforts, tellu-white. To be honest, the Custom Button solution is a bit overkill. I wonder if this "one-pixel" issue is related to what Moonchild recently mentioned here:

viewtopic.php?f=70&t=32466#p263324
Moonchild wrote:
2025-06-16, 21:36
Is there a gap between the menu bar and the menus? Some menus have a 1 px gap (relying on specific rounding behaviour of rendering engines to make it pixel-perfect flush, but not accounting for other engines) and if the mouse passes over such a gap it may collapse the menu as if you moved off of it entirely.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37775
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: athinorama.gr - content overlap/scrolling issue

Post by Moonchild » 2025-06-20, 11:35

No, it's unrelated.

As for this website, it just uses position: sticky; which works normally for me, so I'm not sure why you're having issues with it... it may be timing-dependent when the site manipulates the DOM in rapid succession?
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2900
Joined: 2012-08-19, 20:32

Re: athinorama.gr - content overlap/scrolling issue

Post by back2themoon » 2025-06-20, 13:39

I'd make a video but since tellu-white also reproduced it there's no point.

Perhaps a fiddly issue that only takes place in slow-slowish PC's?

User avatar
tellu-white
Fanatic
Fanatic
Posts: 199
Joined: 2022-03-08, 22:02

Re: athinorama.gr - content overlap/scrolling issue

Post by tellu-white » 2025-06-20, 19:13

back2themoon wrote:
2025-06-20, 07:57
To be honest, the Custom Button solution is a bit overkill.
I've tested a version where resetting the height of the "main" TAG is done automatically after clicking on the button that displays the hidden content.

Notes:

1. I found that the button that displays hidden content does not work until the "Απόρρητο" ("Privacy") button is also loaded on page (see screenshot below). It takes some time.

2. I inserted in code a "timeout" of 5 seconds until the height of the "main" TAG is reset after clicking on the button that displays the hidden content. I did this so that ALL hidden content has time to be loaded on page.

Help:

1. Copy the following code in the "userChrome.css" file (inside the "chrome" folder):

Code: Select all

hbox#fullscr-toggler {
-moz-binding: url(data:text/plain;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+CjwhLS0gQ29weXJpZ2h0IChjKSAyMDE3IEhhZ2dhaSBOdWNoaQpBdmFpbGFibGUgZm9yIHVzZSB1bmRlciB0aGUgTUlUIExpY2Vuc2U6Cmh0dHBzOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvTUlUCiAtLT4KCjwhLS0gUnVuIHVzZXJDaHJvbWUuanMvdXNlckNocm9tZS54dWwgYW5kIC51Yy5qcy8udWMueHVsLy5jc3MgZmlsZXMgIC0tPgo8YmluZGluZ3MgeG1sbnM9Imh0dHA6Ly93d3cubW96aWxsYS5vcmcveGJsIj4KICAgIDxiaW5kaW5nIGlkPSJqcyI+CiAgICAgICAgPGltcGxlbWVudGF0aW9uPgogICAgICAgICAgICA8Y29uc3RydWN0b3I+PCFbQ0RBVEFbCiAgICAgICAgICAgICAgICBpZih3aW5kb3cudXNlckNocm9tZUpzTW9kKSByZXR1cm47CiAgICAgICAgICAgICAgICB3aW5kb3cudXNlckNocm9tZUpzTW9kID0gdHJ1ZTsKCiAgICAgICAgICAgICAgICB2YXIgY2hyb21lRmlsZXMgPSBGaWxlVXRpbHMuZ2V0RGlyKCJVQ2hybSIsIFtdKS5kaXJlY3RvcnlFbnRyaWVzOwogICAgICAgICAgICAgICAgdmFyIHh1bEZpbGVzID0gW107CiAgICAgICAgICAgICAgICB2YXIgc3NzID0gQ2NbJ0Btb3ppbGxhLm9yZy9jb250ZW50L3N0eWxlLXNoZWV0LXNlcnZpY2U7MSddLmdldFNlcnZpY2UoQ2kubnNJU3R5bGVTaGVldFNlcnZpY2UpOwoKICAgICAgICAgICAgICAgIHdoaWxlKGNocm9tZUZpbGVzLmhhc01vcmVFbGVtZW50cygpKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGUgPSBjaHJvbWVGaWxlcy5nZXROZXh0KCkuUXVlcnlJbnRlcmZhY2UoQ2kubnNJRmlsZSk7CiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGVVUkkgPSBTZXJ2aWNlcy5pby5uZXdGaWxlVVJJKGZpbGUpOwoKICAgICAgICAgICAgICAgICAgICBpZihmaWxlLmlzRmlsZSgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAibm9uZSI7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKC8oXnVzZXJDaHJvbWV8LnVjKS5qcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUvanMiOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoLyhedXNlckNocm9tZXwudWMpLnh1bCQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJjaHJvbWUveHVsIjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC8uYXMuY3NzJC9pLnRlc3QoZmlsZS5sZWFmTmFtZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAiYWdlbnRzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvXig/ISh1c2VyQ2hyb21lfHVzZXJDb250ZW50KS5jc3MkKS4rLmNzcyQvaS50ZXN0KGZpbGUubGVhZk5hbWUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlID0gInVzZXJzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSAhPSAibm9uZSIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCItLS0tLS0tLS0tXCAiICsgZmlsZS5sZWFmTmFtZSArICIgKCIgKyB0eXBlICsgIikiKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAidXNlcmNocm9tZS9qcyIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VydmljZXMuc2NyaXB0bG9hZGVyLmxvYWRTdWJTY3JpcHRXaXRoT3B0aW9ucyhmaWxlVVJJLnNwZWMsIHt0YXJnZXQ6IHdpbmRvdywgaWdub3JlQ2FjaGU6IHRydWV9KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2VyY2hyb21lL3h1bCIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeHVsRmlsZXMucHVzaChmaWxlVVJJLnNwZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKHR5cGUgPT0gImFnZW50c2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5BR0VOVF9TSEVFVCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzc3MubG9hZEFuZFJlZ2lzdGVyU2hlZXQoZmlsZVVSSSwgc3NzLkFHRU5UX1NIRUVUKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZih0eXBlID09ICJ1c2Vyc2hlZXQiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFzc3Muc2hlZXRSZWdpc3RlcmVkKGZpbGVVUkksIHNzcy5VU0VSX1NIRUVUKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNzcy5sb2FkQW5kUmVnaXN0ZXJTaGVldChmaWxlVVJJLCBzc3MuVVNFUl9TSEVFVCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaChlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIiMjIyMjIyMjIyMgRVJST1I6ICIgKyBlICsgIiBhdCAiICsgZS5saW5lTnVtYmVyICsgIjoiICsgZS5jb2x1bW5OdW1iZXIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIi0tLS0tLS0tLS0vICIgKyBmaWxlLmxlYWZOYW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uIGxvYWRYVUwoKSB7CiAgICAgICAgICAgICAgICAgICAgaWYoeHVsRmlsZXMubGVuZ3RoID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5sb2FkT3ZlcmxheSh4dWxGaWxlcy5zaGlmdCgpLCBudWxsKTsKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChsb2FkWFVMLCA1KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9LCAwKTsKICAgICAgICAgICAgXV0+PC9jb25zdHJ1Y3Rvcj4KICAgICAgICA8L2ltcGxlbWVudGF0aW9uPgogICAgPC9iaW5kaW5nPgo8L2JpbmRpbmdzPg==);
}
04.png
2. Create a text file with the name "athinorama.uc.js" (a Javascript file whose name ends with ".uc.js") and the following content (inside the same "chrome" folder):

Code: Select all

var fix_athinorama_css__main_TAG_height = {
    handleEvent: function(e) {
		var host = gBrowser.selectedTab.linkedBrowser.currentURI.host;
		
		if(host.includes("athinorama")){
			var target = e.target;

			while (target && target.tagName !== 'A') {
			  target = target.parentNode;
			  if (!target) { return; }
			}
			
			var target_outerHTML = "";
			
			try{
				target_outerHTML = target.outerHTML;
				
			} catch(err){
				// alert(err.message);
			}
			
			if(target_outerHTML != ""){
				if(target_outerHTML.includes("showEventPlaces")){
					try{
						var main_tag_before = content.document.getElementById("main");

						if(main_tag_before){
							main_tag_before.style.cssText = "";
						}
						
					} catch(err){
						// alert(err.message);
					}
					
					setTimeout(function() {
						var main_tag_after = content.document.getElementById("main");

						if(main_tag_after){
							main_tag_after.style.cssText = "height:100% !important;";
						}
						
					}, 5000);
				}
			}
		}
	}
};

window.addEventListener("click", fix_athinorama_css__main_TAG_height, false);
The "chrome" folder will look like this:
05.png
3. Open the page https://www.athinorama.gr/cinema/movie/28_xronia_meta-10086524/ and wait until the "Απόρρητο" ("Privacy") button is also loaded on page, then click the "Πού παίζεται η ταινία" ("Where is the film playing") button:
06.png
The page is displayed correctly:
07.png
PS:

You can read more about the method I used in my post below:

https://forum.palemoon.org/viewtopic.php?f=65&t=31353#p253405
You do not have the required permissions to view the files attached to this post.

User avatar
adoxa
Lunatic
Lunatic
Posts: 440
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: athinorama.gr - content overlap/scrolling issue

Post by adoxa » 2025-06-21, 02:43

A simpler workaround seems to be click the "ΦΙΛΤΡΑ ΑΝΑΖΗΤΗΣΗΣ" button twice.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 199
Joined: 2022-03-08, 22:02

Re: athinorama.gr - content overlap/scrolling issue

Post by tellu-white » 2025-06-21, 07:53

adoxa wrote:
2025-06-21, 02:43
A simpler workaround seems to be click the "ΦΙΛΤΡΑ ΑΝΑΖΗΤΗΣΗΣ" button twice.
This site isn't the first where I've encountered such a problem - with the "footer" TAG in the middle of a scrolled page. In those cases, I didn't try to solve the problem because there were some pages that I reached by chance, not being of interest for me (I don't remember now which were those pages). Seeing that back2themoon also faced this problem, this time I tried to see if there was a workaround. So, the next time I get to a page with such a problem - BUT that doesn't have the "ΦΙΛΛΤΤΡΑ ΑΝΑΖΗΤΗΣΗΣΗΣ" button - I'll test the solution I found now. Maybe I will have to change the ID of the TAG to which I reset its height (in this case it is "main") - I will see then if this workaround works. In conclusion, my solution is a general one, not a particular one that works only in this case.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2900
Joined: 2012-08-19, 20:32

Re: athinorama.gr - content overlap/scrolling issue

Post by back2themoon » 2025-06-21, 09:43

Thanks adoxa for the quick-dirty fix suggestion - works fine. :)

And thanks again tellu-white for your continued work. I applied your suggestions and after some quicks tests, I couldn't reproduce it any more. Will post if it comes back. :thumbup:

Just a few notes:

The Privacy prompt will not appear at all when the often-used filterlists are active, but I guess that does not affect us here.

I also wanted to ask if this is applied globally, or just on athinorama.gr. which would be preferable I think at this stage.
I noticed: if(host.includes("athinorama"). Is this relevant and can it be changed to "athinorama.gr" for a more targetted approach?

User avatar
tellu-white
Fanatic
Fanatic
Posts: 199
Joined: 2022-03-08, 22:02

Re: athinorama.gr - content overlap/scrolling issue

Post by tellu-white » 2025-06-21, 11:19

back2themoon wrote:
2025-06-21, 09:43
I applied your suggestions and after some quicks tests, I couldn't reproduce it any more. Will post if it comes back.
Just a few notes:
The Privacy prompt will not appear at all when the often-used filterlists are active, but I guess that does not affect us here.
I also wanted to ask if this is applied globally, or just on athinorama.gr. which would be preferable I think at this stage.
I noticed: if(host.includes("athinorama"). Is this relevant and can it be changed to "athinorama.gr" for a more targetted approach?
1. The code is not affected by the fact that the Privacy button doesn't appear (if the button that displays hidden content on the page works), but in my case the Privacy button does appear and this causes the button that displays the hidden content on the page to not work until the Privacy button is loaded on the page.

2. The code only interacts with pages that have "host=www.athinorama.gr". For example, the code is not activated for the page https://open.spotify.com/user/athinorama because this page has "host=open.spotify.com".

To see what "host" a page has, open "Tools / Developer Tools / Network":
08.png
3. No need to change "athinorama" to "athinorama.gr" for a "more targetted approach". If you do a Google search you will notice that there are only Greek "athinorama" pages ("gr" = top-level domain for Greece). But if you want to, you can make this change.

4. You say that: "I couldn't reproduce it. I'll post if it comes back."

The code will not work if there are "athinorama.gr" pages with problems that do not have the TAG with "id=main" (whose height must be reset). In this case, the code must be updated to also target the new TAG with problems. Also, the Javascript code in the "athinorama.gr" page that makes the hidden content to be displayed is this:

Code: Select all

onclick="event.preventDefault(); showEventPlaces(this);"
If the "showEventPlaces" function is missing (or has a different name), my code also needs to be updated.
You do not have the required permissions to view the files attached to this post.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2900
Joined: 2012-08-19, 20:32

Re: athinorama.gr - content overlap/scrolling issue

Post by back2themoon » 2025-06-21, 12:57

Perfect - thanks for all the info, tellu-white.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 199
Joined: 2022-03-08, 22:02

Re: athinorama.gr - content overlap/scrolling issue

Post by tellu-white » 2025-06-21, 13:49

back2themoon wrote:
2025-06-21, 12:57
Perfect - thanks for all the info, tellu-white.
My pleasure, back2themoon. I'm glad you find it useful.

User avatar
tellu-white
Fanatic
Fanatic
Posts: 199
Joined: 2022-03-08, 22:02

Re: athinorama.gr - content overlap/scrolling issue

Post by tellu-white » 2025-06-21, 15:38

@back2themoon

An improvement to the Javascript code. I introduced the condition that the code should be executed (in an "athinorama.gr" page) only with click on button that displays hidden content, and not with right-click on it (which doesn't work anyway). This change prevents unnecessary code execution (checking whether a "a" TAG has been clicked) in cases such as copying selected text from the page with "Right-Click / Copy".

In the "athinorama.uc.js" file (inside the "chrome" folder), replace the old code with the code below:

Code: Select all

var fix_athinorama_css__main_TAG_height = {
    handleEvent: function(e) {
		if(e.button == 0){
			var host = gBrowser.selectedTab.linkedBrowser.currentURI.host;
			
			if(host.includes("athinorama")){
				var target = e.target;

				while (target && target.tagName !== 'A') {
				  target = target.parentNode;
				  if (!target) { return; }
				}
				
				var target_outerHTML = "";
				
				try{
					target_outerHTML = target.outerHTML;
					
				} catch(err){
					// alert(err.message);
				}
				
				if(target_outerHTML != ""){
					if(target_outerHTML.includes("showEventPlaces")){
						try{
							var main_tag_before = content.document.getElementById("main");

							if(main_tag_before){
								main_tag_before.style.cssText = "";
							}
							
						} catch(err){
							// alert(err.message);
						}
						
						setTimeout(function() {
							var main_tag_after = content.document.getElementById("main");

							if(main_tag_after){
								main_tag_after.style.cssText = "height:100% !important;";
							}
							
						}, 5000);
					}
				}
			}
		}
	}
};

window.addEventListener("click", fix_athinorama_css__main_TAG_height, false);

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2900
Joined: 2012-08-19, 20:32

Re: athinorama.gr - content overlap/scrolling issue

Post by back2themoon » 2025-06-21, 18:07

Done - thanks again. :)