#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.
#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.
| (function($){ | |
| var insertAtCaret = function(value) { | |
| if (document.selection) { // IE | |
| this.focus(); | |
| sel = document.selection.createRange(); | |
| sel.text = value; | |
| this.focus(); | |
| } | |
| else if (this.selectionStart || this.selectionStart == '0') { | |
| var startPos = this.selectionStart; |
| // ==UserScript== | |
| // @name inwx.de price-sorter | |
| // @namespace inwx.de-price-sorter-SD12 | |
| // @version 0.1 | |
| // @description appends buttons to the domain list to sort the list after prices | |
| // @match http://www.inwx.de/de/domain/* | |
| // @copyright 2012+, Stefan Dietz <[email protected]> | |
| // ==/UserScript== | |
| var appendControls = function() { |
An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.
Everything is broken up by tag, but within each the selectors aren't particularly ordered.
I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A
A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:
-webkit-appearance:none;
| console.reset = function () { | |
| return process.stdout.write('\033c'); | |
| } |
| tell application "Safari" | |
| repeat with theSafariWindow in windows | |
| tell application "Google Chrome" to set theChromeWindow to make new window | |
| repeat with theSafariTab in theSafariWindow's tabs | |
| set theURL to URL of theSafariTab | |
| tell application "Google Chrome" | |
| set theChromeTab to make new tab at end of tabs of theChromeWindow | |
| set URL of theChromeTab to theURL | |
| end tell | |
| end repeat |
| <!-- the standard loop for all your posts --> | |
| {% for post in site.posts %} | |
| <!-- check if there is a portfolio thing set inside the Front Matter | |
| Note: Do not set "portfolio: false" on normal posts - this is not needed | |
| and could lead to problems | |
| --> | |
| {% if post.portfolio %} | |
| <!-- do nothing here --> | |
| {% endif %} |
| # /etc/hosts | |
| 127.0.0.1 localhost | |
| 127.8.8.8 fuckyouverymu.ch | |
| 127.0.0.8 atariba.se | |
| 127.0.0.3 typo3.local | |
| 127.0.0.5 my-awesome-site.local | |
| # In my browser I can now use http://fuckyouverymu.ch to see my localhost (because I have no site.conf for fuckyouverymu.ch at the moment :D) |
| window.console.loge = function (msg) { | |
| var gifs = ['wink','shake-space','peepers','prizza','hat','gradient','fat','rainbow','sunglasses','derp','shake'], | |
| wow = ['', 'wow! ', 'amaze! ', 'dazzle! '], | |
| adjs = ['so', 'such', 'many', 'much', 'very'], | |
| randomizr = function (a) { return a[Math.floor(Math.random() * a.length)];}, | |
| message = '%c ' + randomizr(wow) + randomizr(adjs) + ' ' + typeof msg + ': ', | |
| css = 'background: url(http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-' + randomizr(gifs) + '-212.gif) no-repeat 0 0; background-size: 80px 80px; font-family: \'Comic Sans MS\', cursive; text-shadow: 0 1px 1px rgba(0,0,0,1); font-size: 14px; padding: 25px; line-height: 70px; color: #fff; font-weight: 100;'; | |
| console.log.apply(console, typeof msg === 'object' ? [message, css, msg] : [message += msg, css]); | |
| }; |