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
//Lib | |
import Phaser from "phaser"; | |
//Scenes | |
import playGame from "./playGame"; | |
//Find the perfect ratio | |
let width = 720; | |
let height = 1280; | |
let perfectRatio = width / height; |
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
<?php | |
/* | |
Plugin Name: Posts Search Replace | |
Description: This plugin helps you to search and replace any post content. | |
Version: 0.1.0 | |
Author: Oz | |
*/ | |
$post_type = "page"; //use page or post or any post type you created | |
$filter_type = "include"; //use exclude or include |
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
navigator.getBattery().then(function(battery){ | |
function currentBatteryInfo(){ | |
console.log("Battery charging: "+battery.charging); | |
console.log("Remaining time to fully charge: "+battery.chargingTime); | |
console.log("Remaining time to discharge: "+battery.dischargingTime); | |
console.log("Battery level: "+battery.level*100+"%"); | |
} | |
currentBatteryInfo(); | |
battery.addEventListener('chargingchange', function(){ |
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
$.fn.clearAll = function() { | |
this.each(function(){ | |
var $this = $(this); | |
var resultText = ''; | |
var oldText = $this.val(); | |
$this.on('focus',function(){ | |
resultText = ($this.val() === oldText) ? '' : $this.val(); | |
$this.val(resultText); | |
}); |