View Meta Tags for HTML Website
<meta charset="utf-8"> <!-- set character encoding for the document -->
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- Allows control over where resources are loaded from -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
<!-- Place as early in the document as possible -->
<!-- Only applies to content below this tag -->
View HTML5 Speech Search Supported Languages list
<option value="af-ZA">Afrikaans</option>
<option value="id-ID">Bahasa Indonesia</option>
<option value="ms-MY">Bahasa Melayu</option>
<option value="ca-ES">Català </option>
<option value="cs-CZ">Čeština</option>
<option value="da-DK">Dansk</option>
<option value="de-DE">Deutsch</option>
<optgroup label="English">
<option value="en-AU">Australia</option>
<option value="en-CA">Canada</option>
View Disable Enter key on a Form using JavaScript
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Disable Enter key using JavaScript</title>
<script type="text/javascript">
function keypressAction(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
if (evt.keyCode == 13) {return false;}
}
View Image upload Imgur API JavaScript
/*
--------------------------------
imgur Upload
--------------------------------
+ http://sarmadgardezi.com/blog/code/1522-image-uploader-with-imgur-api-and-javascript/
+ version 1.1
+ Copyright 2017 Sarmad Gardezi
+ Licensed under the MIT license
+ Documentation: http://sarmadgardezi.com/?p=1522
*/
View youtubeaudio
/*
YouTube Audio Embed
--------------------
Author: Sarmad gardezi
Web: http://sarmadgardezi.com/?p=1000
*/
function onYouTubeIframeAPIReady(){var e=document.getElementById("youtube-audio"),t=document.createElement("img");t.setAttribute("id","youtube-icon"),t.style.cssText="cursor:pointer;cursor:hand",e.appendChild(t);var a=document.createElement("div");a.setAttribute("id","youtube-player"),e.appendChild(a);var o=function(e){var a=e?"IDzX9gL.png":"quyUPXN.png";t.setAttribute("src","https://i.imgur.com/"+a)};e.onclick=function(){r.getPlayerState()===YT.PlayerState.PLAYING||r.getPlayerState()===YT.PlayerState.BUFFERING?(r.pauseVideo(),o(!1)):(r.playVideo(),o(!0))};var r=new YT.Player("youtube-player",{height:"0",width:"0",videoId:e.dataset.video,playerVars:{autoplay:e.dataset.autoplay,loop:e.dataset.loop},events:{onReady:function(e){r.setPlaybackQuality("small"),o(r.getPlayerState()!==YT.PlayerState.CUED)},onStateChange:function(e){e.data===YT.PlayerState.ENDED&&o(!1)}}})}