Skip to content

Commit

Permalink
version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fermicat committed Apr 14, 2019
1 parent 7f57643 commit c58bf64
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# Twitter-Weibo-Ad-Cleaner
# Chrome-Extention: Twitter-Weibo-Ad-Cleaner
Twitter and Weibo Ad Cleaner

This is a Chrome Extention for removing advertisement and promotion infomation.

## Install

Download this repo to `/your/path/Chrome-Extention-Twitter-Weibo-Ad-Cleaner`.

In the Chrome browser, visit `More Tools` - `Extensions`.

Enable `Developer mode`.

Click `Load unpacked` with this repo.

35 changes: 35 additions & 0 deletions app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/***************************** for Twitter ******************************/

[data-promoted="true"], .dashboard-right
{
display: none;
}



/***************************** for Weibo ********************************/

[feedtype="ad"], [node-type="recommendTopic"]
{
display: none !important;
}

.WB_main_r, #v6_pl_content_biztips, .gn_search_v2 span.placeholder, .gn_topmenulist_search
{
display: none !important;
}

.gn_nav_list li:not(:last-child) {
display: none !important;
}

.WB_frame
{
padding: 50px 0 0 0 !important;
padding-left: 100px !important;
}

.WB_main_c {
width: 700px !important;

}
5 changes: 5 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(function () {
setTimeout(() => {
$("#v6_pl_content_publishertop textarea").val("Clean version.");
}, 2000);
});
7 changes: 7 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// run this method after click the button
chrome.browserAction.onClicked.addListener(function(activeTab)
{
// run run.js
chrome.tabs.executeScript( activeTab.id , {file:'run.js'});
});

4 changes: 4 additions & 0 deletions jquery-3.2.1.min.js

Large diffs are not rendered by default.

Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"manifest_version": 2,

"name": "Remove-Twitter-Weibo-Ad",
"description": "A Chrome Extension for removing ads from Twitter and Weibo. Logo from https://thenounproject.com/monstercritic",
"version": "1.0",

"permissions": [
"http://*/*","https://*/*",
"tabs",
"notifications",
"alarms"
],
"browser_action": {
"default_icon": "logo.png"
}
,
"background":
{
"scripts": ["background.js"]
},
"web_accessible_resources": [
"logo.png"
]

,
"content_scripts": [
{
"matches": ["https://twitter.com/*","https://www.facebook.com/","http://weibo.com/*","http://www.weibo.com/*","https://weibo.com/*","https://www.weibo.com/*"],
"css": ["app.css"],
"js": ["jquery-3.2.1.min.js","app.js"]
}
]


}
1 change: 1 addition & 0 deletions run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alert("Version 1.0: \n Remove Ads on Weibo and Twitter.");

0 comments on commit c58bf64

Please sign in to comment.