swordbattle.io icon indicating copy to clipboard operation
swordbattle.io copied to clipboard

Ad is not horizontally centered in GameResults modal

Open codergautam opened this issue 1 year ago • 1 comments

The ad on the Game Results or end screen isn't always horizontally centered. I've narrowed down the issue to this part of the code added in #23 :

https://github.com/codergautam/swordbattle.io/pull/23/commits/32e0d03e271a7515645f96605b4fe3cd95a42b16#diff-f2286f8bf2376694d9c87b819c26cc746048c6c82427ac6036418b9cf48389a3R56

Sometimes Adinplay serves ads smaller than the one we requested, for example a 728x90 when requesting a 970x90 ad. We need an accurate way of determining what the size of the ad being served is, so that it can be centered properly.

codergautam avatar Jan 19 '24 02:01 codergautam

Hey , Can't we use mutation observer. And center the ad horizontally.

terminator2299 avatar Dec 08 '24 12:12 terminator2299