Big overview of what's missing in Safari 7.1+ and iOS 8+ in terms of browser storage.
Updated May 25th 2016
<?php | |
$image = new JImage('/path/to/original.jpg'); | |
$height = $image->getHeight(); | |
$width = $image->getWidth(); | |
if ($height > $width) { | |
$crop_square = $width; | |
$crop_top = ($height - $width) / 2; |
// To get started, make sure you're using the latest version of the analytics.js snippet (4.1.0 or above) | |
// and remove the `analytics.load("YOUR_WRITE_KEY")` call. then drop this script below the snippet. | |
// this is a standalone script for modern browsers. if you'd like to target older browsers, include | |
// a fetch polyfill and use that instead of window.fetch. This would require that you build and package the | |
// script somehow (rollup, webpack, browserify, etc). You may also want to transpile it to ES5 w eg Babel. | |
// This script is configured to make all collection opt-in (rather than opt-out) for all users. | |
// If you want to conditionally require whether or not to block data collection before affirmative consent, use something | |
// like inEU below and pass that function into `conditionallyLoadAnalytics`. If you want to collect data until the user |
/** | |
* Steps to use: | |
* 1. Create CF Worker, copy and paste this in | |
* 2. (Optional) Update configuration defaults | |
* - If you want to manage in code, do so below under "Static Configuration" | |
* - If you want dynamic custom config: Create CFW KV namespace, link them, and add reference below | |
* | |
* - You can overwrite default path prefix for loading analytics.js (<yourdomain>/ajs) | |
* (corresponding KV entry: `script_path_prefix`) | |
* - You can overwrite default path prefix for handling first-party data collection (<yourdomain>/data) |
worker.js
code to a new Cloudflare Worker/tunnel/*
and point it to your new workerhttps://browser.sentry-cdn.com/
with ./tunnel/
<script src="./tunnel/6.9.0/bundle.min.js"></script>
init
Sentry with the tunnel
option set to /tunnel/
Sentry.init({ dsn: "__DSN__", tunnel: "/tunnel/" })