Skip to content

Instantly share code, notes, and snippets.

View sindre's full-sized avatar

Sindre Wimberger sindre

View GitHub Profile
@stowball
stowball / wp8-ie10-fix.js
Last active April 17, 2022 19:09
Microsoft's stop-gap solution to fix IE 10 & 11's viewport on Windows Phone 8. I've also added another condition so it won't run on other browsers that spoof the user agent. Details: http://mattstow.com/responsive-design-in-ie10-on-windows-phone-8.html
(function() {
if ("-ms-user-select" in document.documentElement.style && navigator.userAgent.match(/IEMobile/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode("@-ms-viewport{width:auto!important}")
);
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
}
})();
@mgoerlich-dev
mgoerlich-dev / ios6-timers.js
Created October 31, 2012 19:27 — forked from ronkorving/ios6-timers.js
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is free to use by anyone (MIT, blabla).
// Author: rkorving@wizcorp.jp
var timeouts = {};
var intervals = {};
@brunob
brunob / TileLayer.TileJSON.js
Created April 24, 2012 13:10 — forked from DGuidi/TileLayer.TileJSON.js
Leaflet TileCanvas
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);
@scottjehl
scottjehl / index.html
Created March 12, 2012 09:32
jQuery Mobile FixedToolbar Polyfill for non-fixed-positioning-supporting browsers (like iOS4)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fixed Toolbars Polyfill</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css">
<link rel="stylesheet" href="jquery.mobile.fixedToolbar.polyfill.css">
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@DGuidi
DGuidi / leaflet.google.js
Created March 7, 2012 12:27
leaflet+google integration
/*
* Here the 'inspiration': http://goo.gl/OKL9A
* Adapted from: http://psha.org.ru/leaflet/Google.js
* Demo: http://psha.org.ru/leaflet/bel.html
* This code works well with jquerymobile:
* the original code maintain a div.height of 0 for the internal google container
* REMARKS: this
* NOTE: jQuery required!
*/
@DGuidi
DGuidi / TileLayer.TileJSON.js
Created February 1, 2012 08:49
Leaflet TileCanvas
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);
@andrewharvey
andrewharvey / leaflet-side-by-side.html
Created September 5, 2011 11:11
Demo web app displaying two web maps side by side in sync with each other based on Leaflet
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file is licenced CC0 http://creativecommons.org/publicdomain/zero/1.0/
-->
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Leaflet Maps Side by Side</title>
<link rel="stylesheet" href="/javascript/leaflet/leaflet.css" type="text/css" />
<!--[if lte IE 8]><link rel="stylesheet" href="/javascript/leaflet/leaflet.ie.css" /><![endif]-->
<style type="text/css">
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!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>
@chuanxshi
chuanxshi / mobile tags for your '<head>'
Created March 1, 2011 14:56
mobile tags for your '<head>'
<!doctype html>
<!-- Helpful things to keep in your <head/>
// Shi Chuan, https://github.com/shichuan/mobile-html5-boilerplate
-->
<head>
<!-- consider using below meta tags if you want to disable format detection by default -->
<meta name="format-detection" content="telephone=no"/>
<meta name="format-detection" content="address=no"/>
<!-- consider using below link tag if the page is duplicate content of a desktop version -->