-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 653d08a
Showing
7 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Background Page</title> | ||
<script> | ||
chrome.extension.onRequest.addListener( | ||
function (request, sender, sendResponse) { | ||
'use strict'; | ||
if (!!request.status) { | ||
chrome.pageAction.setIcon({tabId: sender.tab.id, path: 'icon-16.png'}); | ||
} else { | ||
chrome.pageAction.setIcon({tabId: sender.tab.id, path: 'icon-16-dim.png'}); | ||
} | ||
chrome.pageAction.show(sender.tab.id); | ||
sendResponse({}); | ||
} | ||
); | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
============================================================================= | ||
***************************************************************************** | ||
The contents of this file are subject to the Mozilla Public License | ||
Version 1.1 (the "License"); you may not use this file except in | ||
compliance with the License. You may obtain a copy of the License at | ||
http://www.mozilla.org/MPL/ | ||
Software distributed under the License is distributed on an "AS IS" | ||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
License for the specific language governing rights and limitations | ||
under the License. | ||
The Original Code is Avro Keyboard for Google Chrome | ||
The Initial Developer of the Original Code is | ||
Rifat Nabi <to.rifat@gmail.com> | ||
Copyright (C) OmicronLab (http://www.omicronlab.com). All Rights Reserved. | ||
Contributor(s): ______________________________________. | ||
***************************************************************************** | ||
============================================================================= | ||
*/ | ||
/*global jQuery, chrome, console */ | ||
function sendStatus(bangla) { | ||
'use strict'; | ||
chrome.extension.sendRequest({status: bangla}, function (response) { | ||
if (response) { | ||
console.log('Avro Switched'); | ||
} | ||
}); | ||
} | ||
|
||
jQuery.noConflict(); | ||
jQuery(function () { | ||
'use strict'; | ||
jQuery('textarea, input[type=text]').avro({'bangla': false}, function (isBangla) { | ||
sendStatus(isBangla); | ||
}); | ||
|
||
jQuery('textarea, input[type=text]').on('blur', function () { | ||
sendStatus(false); | ||
}); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "Avro Keyboard", | ||
"version": "1.0", | ||
"description": "Official Avro Keyboard for Google Chrome", | ||
"background_page": "background.html", | ||
"page_action" : { | ||
"default_icon" : "icon-16-dim.png", | ||
"default_title" : "There's a 'sandwich' in this page!" | ||
}, | ||
"permissions": ["tabs", "http://*/*", "https://*/*" ], | ||
"icons" : { | ||
"16" : "icon-16.png", | ||
"48" : "icon.png" | ||
}, | ||
"content_scripts" : [ | ||
{ | ||
"matches" : [ | ||
"http://*/*", | ||
"https://*/*" | ||
], | ||
"js" : ["js/jquery-1.7.1.min.js", "js/avro-1.1-beta.min.js", "js/content.js"], | ||
"run_at" : "document_end", | ||
"all_frames" : true | ||
} | ||
] | ||
} |