disables select text on android 3.0+ #35

Merged
merged 3 commits into from Apr 17, 2012
Jump to file or symbol
Failed to load files and symbols.
+16 −1
Split
@@ -129,6 +129,18 @@ function selectText() {
PhoneGap.exec(null, null, 'SelectTextPlugin', 'selectText', []);
}
+function setSelectTextHidden(){
+
+ if (androidVersion){
+ if (parseInt(androidVersion) > 10){
+ console.log("hiding select text");
+ $("#selectTextCmd").remove();
+ }
+ }
+
+}
+
+
function sharePage() {
// @fixme if we don't have a page loaded, this menu item should be disabled...
var title = app.getCurrentTitle(),
View
@@ -115,7 +115,8 @@ window.chrome = function() {
$('#mainHeader, #menu').localize();
});
l10n.initLanguages();
-
+
+ setSelectTextHidden();
updateMenuState();
toggleMoveActions();
@@ -61,6 +61,8 @@ public void onCreate(Bundle savedInstanceState) {
String startingUrl = "file:///android_asset/www/index.html";
appView.addJavascriptInterface(new StartingWordAccessor(wordToShow),
"startingWordAccessor");
+ appView.addJavascriptInterface(android.os.Build.VERSION.SDK_INT,
+ "androidVersion");
super.loadUrl(startingUrl);
String currentUA = this.appView.getSettings().getUserAgentString();