#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.
xcode-select --install | |
# Install dependencies | |
brew install wget autoconf openssl libjpeg libpng lzlib curl imap-uw readline postgresql libxml2 mcrypt gettext libxslt homebrew/dupes/libiconv icu4c expat bison webp freetype | |
# Dirs | |
mkdir -p /Applications/MAMP/bin/php/php7.1.12/include | |
cd /Applications/MAMP/bin/php/php7.1.12/include | |
# Download PHP 7.1.12 sources |
///======================================== | |
/// showModalDialog.js | |
/// | |
/// Created by Haraguroicha 2014-10-06 | |
///======================================== | |
(function() { | |
window._smdName = window._smdName || Math.round(Math.random() * 1000000000); | |
window.spawn = window.spawn || function(gen) { | |
function continuer(verb, arg) { | |
var result; |
{ | |
"name": "my-app", | |
"version": "1.0.0", | |
"description": "My test app", | |
"main": "src/js/index.js", | |
"scripts": { | |
"jshint:dist": "jshint src/js/*.js", | |
"jshint": "npm run jshint:dist", | |
"jscs": "jscs src/*.js", | |
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |
# This hosts file is brought to you by Dan Pollock and can be found at | |
# http://someonewhocares.org/hosts/ | |
# You are free to copy and distribute this file for non-commercial uses, | |
# as long the original URL and attribution is included. | |
#<localhost> | |
127.0.0.1 localhost | |
127.0.0.1 localhost.localdomain | |
255.255.255.255 broadcasthost | |
::1 localhost |
#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.
// MIT http://rem.mit-license.org | |
function trim(c) { | |
var ctx = c.getContext('2d'), | |
copy = document.createElement('canvas').getContext('2d'), | |
pixels = ctx.getImageData(0, 0, c.width, c.height), | |
l = pixels.data.length, | |
i, | |
bound = { | |
top: null, |