Last active
June 16, 2017 13:22
-
-
Save bogdan-nourescu/d0ae3b64a7a6f33928f3f3e74960ef24 to your computer and use it in GitHub Desktop.
This file contains 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
var newPlace = document.querySelector(".p6n-product-logo"); | |
newPlace.innerHTML=""; | |
var interval = setInterval(function(){ | |
//we have setInterval here because they are lazy loading the pins | |
var pins=document.querySelectorAll("pan-console-nav-section-item.p6n-console-nav-pin-container"); | |
if (pins.length > 0) { | |
clearInterval(interval); | |
} else { | |
return; | |
} | |
for(var i=0;i<pins.length;i++){ | |
var pin=document.querySelectorAll("pan-console-nav-section-item.p6n-console-nav-pin-container")[i]; | |
pin.querySelector(".p6n-console-nav-item-text").remove(); | |
pin.querySelector("ng-transclude").remove(); | |
pin.querySelector("pan-logo.p6n-console-nav-item-icon").style.width="48px" | |
pin.querySelector(".p6n-console-nav-item-link").style.minWidth="24px"; | |
newPlace.appendChild(pin); | |
} | |
},1000); |
This file contains 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
{ | |
"manifest_version": 2, | |
"name": "Pins GCP", | |
"description": "Moves the pins in GCP", | |
"version": "0.1", | |
"permissions": [ | |
"tabs", | |
"https://console.cloud.google.com/*" | |
], | |
"content_scripts": [ | |
{ | |
"matches": ["https://console.cloud.google.com/*"], | |
"js": ["inject_script.js"], | |
"run_at": "document_idle" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment