Mapillary has become useless once again

Tampermonkey is great! :+1:

I have coded a script that shows/hides the box, too, but by a button.

// ==UserScript==
// @name         Mapillary Map Closer
// @description  Adds button to remove/reload the map or pic on left bottom of Mapillary website
// @match        https://www.mapillary.com/*
// @require      https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant        GM_addStyle
// ==/UserScript==

if(window.location.href.includes('pKey=') ){  //Sometimes you must reload the website once to show/hide the button. It's still a little bug.

//create button
var button = document.createElement("Button");
button.innerHTML = 'Go away!'
button.id = 'btn_closeMap';
button.style = 'bottom:43px;height:40px;left:19px;width:100px;position:absolute;z-index:99999;padding:0px;';
document.body.appendChild(button);

//this happens, if you click the button
$('#btn_closeMap').click ( function () {
    if (button.innerHTML=='Go away!'){
        GM_addStyle('.ng-tns-c126-0.Window { visibility:hidden; }');
        button.innerHTML='Map/Pic come back!';
    } else if (button.innerHTML=='Map/Pic come back!'){
        GM_addStyle('.ng-tns-c126-0.Window { visibility:visible; }');
        button.innerHTML='Go away!';
    }
} );

}

Hiding is pretty quick, but re-showing is a bit slower, because there the script reloads the website. And Sometimes you must reload the website once to show/hide the button. If someone wants to improve it: Feel free!

€: Code updated, thanks to pkoby!

3 Likes