This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
-------------------------------- | |
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 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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;} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Script by Sarmad Gardezi sarmadgardezi.com | |
<script type="text/javascript"> | |
(function () { | |
var options = { | |
facebook: "874618785985682", // Facebook page ID | |
whatsapp: "03001234567", // WhatsApp number | |
viber: "sarmadgardezi", // Viber number | |
snapchat: "sarmadgardezi", // Snapchat username | |
line: "03001234567", // Line QR code URL | |
telegram: "sarmadgardezi", // Telegram bot username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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)}}})} |