Skip to content

Commit

Permalink
disable the loading of social buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Jul 13, 2016
1 parent a9f1bcc commit d6c3d35
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#1.1.3
* Improvement: The FB, Twitter and Google+ button are not loaded


#1.1.2
* Improvement: If there is only one string is opened automatically
* Fix: Remove the ' on comments to avoid problems
Expand Down
13 changes: 13 additions & 0 deletions block-social-footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
chrome.webRequest.onBeforeRequest.addListener(
function (requestDetails) {
if (requestDetails.originUrl.indexOf("translate.wordpress.org") !== -1) {
return {
cancel: true
};
}
},
{
urls: ["https://platform.twitter.com/*", "https://www.facebook.com/plugins*", "https://apis.google.com/js/platform.js"]
},
["blocking"]
);
2 changes: 0 additions & 2 deletions glotdict.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,6 @@ jQuery(document).ready(function () {
});
}

// Remvoe the social button in the bottom
jQuery('#wporg-footer ul:last-child').remove();
gd_add_project_links();
gd_add_button();

Expand Down
10 changes: 8 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Add custom dictonaries on translate.wordpress.org",
"manifest_version": 2,
"name": "GlotDict",
"version": "1.1.2",
"version": "1.1.3",
"homepage_url": "https://github.com/Mte90/GlotDict",
"icons": {
"16": "icons/icon-16.png",
Expand All @@ -27,6 +27,12 @@
"web_accessible_resources": [
"glotdict.js",
"keymaster.js"
]
],
"permissions": [
"webRequest", "webRequestBlocking"
],
"background": {
"scripts": ["block-social-footer.js"]
}

}

0 comments on commit d6c3d35

Please sign in to comment.