Last active
December 27, 2015 06:19
-
-
Save t-kashima/7281159 to your computer and use it in GitHub Desktop.
Yammerの表示から指定した要素を削除します。
content_script.jsのHIDE_ID_LISTで要素を指定して下さい。
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
.display_none { | |
display: none !important; | |
} |
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
const HIDE_ID_LIST = [ | |
'[href="#import-address-book-lightbox"]', | |
'[href="#reinvite-all-lightbox"]' | |
]; | |
var hideElementById = function(id) { | |
var elements = document.querySelectorAll(id); | |
for (var i = 0; i < elements.length; i++) { | |
var e = elements[i]; | |
if (e.classList.contains('display_none') === false) { | |
e.classList.add('display_none'); | |
} | |
} | |
}; | |
(function() { | |
// console.log('This site is a Yammer'); | |
for (var i = 0; i < HIDE_ID_LIST.length; i++) { | |
var id = HIDE_ID_LIST[i]; | |
// console.log('remove id: ' + id); | |
this.hideElementById(id); | |
} | |
})(); |
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
{ | |
"name": "Hiding in Yammer", | |
"version": "1.0.0", | |
"manifest_version": 2, | |
"description": "This extention hide a part in Yammer", | |
"content_scripts": [ | |
{ | |
"matches": ["https://www.yammer.com/*"], | |
"css": ["content_script.css"], | |
"js": ["content_script.js"] | |
} | |
], | |
"permissions": ["background"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment