Roukys / HHauto

GNU General Public License v3.0
45 stars 44 forks source link

Bug [All] - Server side advertisement shenanigans blocks script feature #176

Closed Knatan closed 3 years ago

Knatan commented 3 years ago

So this isn't really a fault in the script. But there is a conflict for Adblock Plus users regardless. The game serves advertisements inside iframe which is inside a div. The Adblock Plus extension successfully removes the 3rd party advertisement. But custom implementations like #iframe_wrapper remains since the blocklist does not target this HH website specifically. Untitled

The consequence of this means the "Do All" button becomes blocked by an invisible DIV. And users who attempt to click on it will mistakenly believe the script is buggy and not functional.

What is the best course of action in this case? Option 1: we can contact the blocklist maintainers and ask them to include this HH, so this DIV will be cleared. The problem with this is there are many of them, we likely won't be able to convince all of them since some of them don't like to include lewd websites as a policy.

Option 2: Should we outright nuke it? Nuking it with display;none might be too aggressive, I'm not sure if they have some free Koban promotions inside that DIV, but there is a possibility they do.

Option 3: Perhaps we could do some sort of z-index manipulation of the element? That might be a less drastic option.

Option 4: We could also give up that real estate and move the button elsewhere. This is the least confrontational approach, but the DIV will still be a problem to other script menus such as the "HH++ (OCD) Season version" script.

Any other suggestions?

Nox-Ater commented 3 years ago

@Knatan

Change for uBlock Origin.

Knatan commented 3 years ago

@Nox-Ater That would be a symptom treatment. Not solving the problem which others might also have.

Option 5: We could also contact game developers. I'm not sure if they care about supporting people with adblockers though.

Roukys commented 3 years ago

z-index could help, @Knatan can you try on line starting with UIcontainer.html to modify z-index to a higher value ?

NinJaraya commented 3 years ago

I use userstyles: https://github.com/openstyles/stylus / ==UserStyle== @name HH hide ADS @namespace github.com/openstyles/stylus @version 1.0.0 @description A new userstyle @author Jaraya ==/UserStyle== / @-moz-document regexp("^https://(www|test|nutaku).h(entai|arem)heroes.com/.*$") {

iframe_wrapper {

    display: none!important;
}

}

Knatan commented 3 years ago

z-index could help, @Knatan can you try on line starting with UIcontainer.html to modify z-index to a higher value ?

I'm not sure what's going on. Your #sMenu is already set to z-index 1000 from what I can tell. Yet the "do all" toggle still not clickable.

The #iframe_wrapper itself doesn't have a z-index. But its parent #sliding-popups has z-index 3. I tried to change it to z-index 2, and no difference happened. Then I tried to change #sliding-popups to z-index 1, and then your "Do all" toggle became clickable again.

Roukys commented 3 years ago

I need to dig deeper on that, I'm not a css specialist :D

NinJaraya commented 3 years ago

I need to dig deeper on that, I'm not a css specialist :D

Geniuses, just insert: GM_addStyle('#iframe_wrapper { display: none!important;;}');

Knatan commented 3 years ago

@NinJaraya Your proposal was mentioned in option 2. Are you certain the HH developers don't use that #iframe_wrapper for things like promoting free Kobans? As far as I know they used to ask you to visit a website and then you get 150 Koban, or 300 Koban, or something like that.

We can't just nuke it without making sure it has no such consequences.

NinJaraya commented 3 years ago

For that there is an item in the menu called "Sex Friends":

sexfriends sexfriends2

As you can see, I don't use it myself. :)

Knatan commented 3 years ago

@NinJaraya That's besides the point. I don't agree that the script should cripple the game's ability to advertise free Kobans for its users. You're free to apply your own userstylesheet as always.

Roukys commented 3 years ago

@Knatan can you try that : GM_addStyle('#popups#sliding-popups, #sliding-popups#sliding-popups { z-index : 1;} #sliding-popups { z-index : 1;}'); I'm waiting to have it back to be able to check what we can do.

NinJaraya commented 3 years ago

On the test server, the popup to collect the daily 60 kobans, appears normally.

NinJaraya commented 3 years ago

You can try:

sliding-popups #iframe_wrapper { left: 780px!important; opacity: .5!important; }

Knatan commented 3 years ago

can you try that : GM_addStyle('#popups#sliding-popups, #sliding-popups#sliding-popups { z-index : 1;} #sliding-popups { z-index : 1;}');

@Roukys GM_addStyle('#popups#sliding-popups, #sliding-popups#sliding-popups { z-index : 1;} #sliding-popups { z-index : 1;}'); I tried to add this to line 7148 in your script. It worked!

Then I tried to alter line 7148 into GM_addStyle('#sliding-popups#sliding-popups { z-index : 1;}'); And it also worked!

RuperSama commented 3 years ago

i dont read all the thread but the ad can be removed with this.

function moduleAd(){ var ad = document.getElementById("iframe_wrapper"); if(ad != null){ ad.remove(); } }