Last active
March 13, 2025 07:50
-
-
Save vdsabev/bbbd13d483ba276304bbf777a4c2563b to your computer and use it in GitHub Desktop.
Block ads on fly.pieter.com and fly.zullo.fun (sorry guys I just want to fly around :))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function blockAds() { | |
const ads = [ | |
'banner', | |
'beachTextMesh', | |
'billboard', | |
'billboard2', | |
'blimp2Group', | |
'blimp3Group', | |
'blimpGroup', | |
'castle', // Sadly can't only hide the text | |
'chatBubbleMainGroup', | |
'floatingHouseLabel', | |
'flyThroughRingText', | |
'hotAirBalloon2Group', | |
'hotAirBalloon3Group', | |
'hotAirBalloonGroup', | |
'iphoneBillboard', | |
'iphoneBillboardPoleLeft', | |
'iphoneBillboardPoleRight', | |
'islandTextBanner2Plane', | |
'islandTextBannerPlane', | |
'jupiterBanner', | |
'lindyBanner', | |
'marsBanner', | |
'medviBlimpGroup', | |
'mountainSign', | |
'prisonBanner', | |
'shapedBillboard', | |
'textCloudGroup', | |
'ufoGroup', | |
]; | |
for (const ad of ads) { | |
try { | |
eval(`${ad}.visible = false`); | |
} catch (error) { | |
console.error(`${ad} not found`); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function blockAds(children = game.sceneManager.scene.children) { | |
for (const child of children) { | |
if (child.userData.isClickable) { | |
child.visible = false; | |
} | |
blockAds(child.children); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment