Last active
July 9, 2024 05:58
-
-
Save amirhp-com/1f30132afbb54970930690d06dc9a764 to your computer and use it in GitHub Desktop.
Remove Google Map "FOR DEVELOPMENT PURPOSES ONLY" Watermark !
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
/* | |
π Remove "For Development Only" Watermark on GOOGLE MAP π | |
π€ SCRIPT BY AmirhpCom ( https://amirhp.com/) π | |
β Add this code on your project and edit langID,mapCanvas variables | |
*/ | |
var langID = "en-US", mapCanvas = "#map-canvas", $ = jQuery; | |
setInterval(function () {googlemap_remap();}, 10); | |
function googlemap_remap() { | |
$(`${mapCanvas}>div:last-of-type`).hide(); //hide top message says this is for dev only | |
var gimg = $(`img[src*="maps.googleapis.com/maps/vt?"]:not(.gmf)`); | |
$.each(gimg, function(i,x){ | |
var imgurl = $(x).attr("src"); | |
var urlarray = imgurl.split('!'); | |
var newurl = ""; var newc = 0; | |
for (i = 0; i < 1000; i++) {if (urlarray[i] == "2s"+langID){newc = i-3;break;}} | |
for (i = 0; i < newc+1; i++) {newurl += urlarray[i] + "!";} | |
$(x).attr("src",newurl).addClass("gmf"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It only works for the street layer, not for the terrain one