#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
| /* Assuming: | |
| * dataview is a { xtype: "list" } | |
| * dataview.itemTpl includes a <div class="deleteplaceholder"></div> | |
| * | |
| * Delete button will disappear as soon as something is touched | |
| */ | |
| dataview.on("itemswipe", function(dataview, ix, target, record, event, options) { | |
| if (event.direction == "left") { | |
| var del = Ext.create("Ext.Button", { |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
| <!DOCTYPE html> | |
| <head> | |
| <title>Stay Standalone</title> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <script src="stay_standalone.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <ul> | |
| <li><a href="http://google.com/">Remote Link (Google)</a></li> |