Skip to content

Instantly share code, notes, and snippets.

@alekskorovin
alekskorovin / tile-splash-favicons.html
Last active December 23, 2015 08:19
Icons & favicons, splash screens, tiles
<!-- IE 10 Metro tile icon -->
<!-- Set a color of a tile -->
<meta name="msapplication-TileColor" content="#000">
<!-- Place an icon inside of a tile -->
<meta name="msapplication-TileImage" content="/images/favicons/apple-touch-icon-144.png">
<!-- iOS splash images -->
<!-- iPhone portrait -->
<link rel="apple-touch-startup-image" href="/images/splash/splash-320.png" />
<!-- iPad portrait -->
<link rel="apple-touch-startup-image" sizes="768x1004" href="/images/splash/splash-768.png" />
@alekskorovin
alekskorovin / video-player-wmv-player-mediaelementjs.html
Last active December 23, 2015 14:59
Video Player. Windows Media Player for an IE browsers and MediaElementJs for a modern browsers.
<!doctype html>
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]><html class="ie ie9" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
<title>MediaPlayer</title>
<script src="js/libs/jquery-1.9.1.min.js"></script>
@alekskorovin
alekskorovin / uri.js
Created October 11, 2013 11:24 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@alekskorovin
alekskorovin / placeholder.css
Created October 17, 2013 13:52
Styling of a Placeholder text
/* =Placeholders */
/* Reset of Placeholder text behaviour */
:focus::-webkit-input-placeholder { color: transparent; }
:focus::-moz-placeholder { color: transparent; } /* Firefox 19+ */
:focus:-moz-placeholder { color: transparent; } /* Firefox 18 */
/* Color of Placeholder text */
::placeholder { color: #ccc; }
::-webkit-input-placeholder { color: #ccc; }
::-moz-placeholder { color: #ccc; opacity: 1; } /* Firefox 19+ */
@alekskorovin
alekskorovin / reset-behaviour-of-ie10-form-fields.css
Created October 17, 2013 13:58
Clear behaviour of IE10 form fields
/* Clear behaviour of IE10 form fields */
::-ms-clear, ::-ms-reveal {
display: none;
}
@alekskorovin
alekskorovin / action-after-confirm.js
Created October 17, 2013 14:02
Setting up a confirm window before performing of an action
var beforeActionMessage = 'Are you sure you want to perform this action?',
confirmWindow = window.confirm(beforeActionMessage);
if (confirmWindow) {
// Do some action here
} else {
return false;
}
@alekskorovin
alekskorovin / on.js
Created October 17, 2013 14:21
Handler for jQuery
; (function ($) {
'use strict'
var handler = function() {
//
}
$('.btn-class').on('click', handler);
@alekskorovin
alekskorovin / unique-self-executed-function.js
Created October 17, 2013 14:27
Unique Self Executed function
(function mySelfExecutedFunction() {
//
})();
@alekskorovin
alekskorovin / reset-iframe-video.js
Created October 17, 2013 14:36
Reset a Video players - iframes from YouTube or Vimeo, etc.
// Reset a Video players - iframes from YouTube or Vimeo, etc.
var resetIframeVideoPlayer = function () {
var $videoPlayer = $(this), videoIframeSrc;
// Store the src of iframe with video
videoIframeSrc = $player.attr('src');
// Clear src attribute from an iframe
$videoPlayer.attr('src', '');
@alekskorovin
alekskorovin / calculate-size-of-video.js
Created October 17, 2013 14:40
Calculation of Video container with standard proportions. jQuery
var videoWidth = containerOfVideo.width(),
videoHeight = Math.round(videoWidth * 0.5625);