Chrome notifications test
How do I make an chrome notifications test?
(updated on 14th Dec). What is a chrome notifications test? How do you make a chrome notifications test? This script and codes were developed by Gabriel on 18 July 2022, Monday.
Chrome notifications test - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>chrome notifications test</title> <link rel='stylesheet prefetch' href='http://bootswatch.com/flatly/bootstrap.min.css'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ input.form-control {max-width: 300px;margin: 0 0 10px;}
.alert {display: none;}
.notice {color: #888;) </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="container"> <h1>HTML5 Notification - Chrome only! <small>just a test...</small></h1> <hr> <div class="well"><strong>Info</strong>: Outdated in newer Chromes...API has changed.</div> <div class="alert alert-info" id="clicked">You clicked on the notification at</div> <div class="alert alert-success" id="ischrome">You're using Chrome - you can run this test.</div> <div class="alert alert-danger" id="isntchrome">To use this, you need to use Google Chrome.</div> <input type="text" id="title" placeholder="notification title" class="form-control"> <input type="text" id="msg" placeholder="notification message" class="form-control"> <button id="notify" class="btn btn-primary">Notify!</button> <br> <br> <small class="notice"><b>Note:</b> try a click on the notification! :)</small>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Chrome notifications test - Script Codes CSS Codes
input.form-control {max-width: 300px;margin: 0 0 10px;}
.alert {display: none;}
.notice {color: #888;)
Chrome notifications test - Script Codes JS Codes
var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if (isChrome) { $('#ischrome').fadeIn('fast'); $('#notify').click(function(){ notify(); });
} else { $('#isntchrome').fadeIn('fast'); $('input, button').attr('disabled','disabled');
}
function notify() { var allowed = 0;//window.webkitNotifications.checkPermission(); if (allowed == 0) { var note = window.webkitNotifications.createNotification( 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/79086/codepen.jpg', $('#title').val(), $('#msg').val() ); note.onclick = function () { time = new Date().getTime(); time /= 1000; $('#clicked').fadeIn('fast'); $('#clicked').append(date(' H:m:s ...',time)); note.close(); } note.show(); } else { window.webkitNotifications.requestPermission(); }
}
/* * PHP date() function in JS (minified) * phpjs.org/functions/date/ */
function date(e,t){var n=this,r,i,s=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"],o=/\\?(.?)/gi,u=function(e,t){return i[e]?i[e]():t},a=function(e,t){e=String(e);while(e.length<t){e="0"+e}return e};i={d:function(){return a(i.j(),2)},D:function(){return i.l().slice(0,3)},j:function(){return r.getDate()},l:function(){return s[i.w()]+"day"},N:function(){return i.w()||7},S:function(){var e=i.j(),t=e%10;if(t<=3&&parseInt(e%100/10,10)==1){t=0}return["st","nd","rd"][t-1]||"th"},w:function(){return r.getDay()},z:function(){var e=new Date(i.Y(),i.n()-1,i.j()),t=new Date(i.Y(),0,1);return Math.round((e-t)/864e5)},W:function(){var e=new Date(i.Y(),i.n()-1,i.j()-i.N()+3),t=new Date(e.getFullYear(),0,4);return a(1+Math.round((e-t)/864e5/7),2)},F:function(){return s[6+i.n()]},m:function(){return a(i.n(),2)},M:function(){return i.F().slice(0,3)},n:function(){return r.getMonth()+1},t:function(){return(new Date(i.Y(),i.n(),0)).getDate()},L:function(){var e=i.Y();return e%4===0&e%100!==0|e%400===0},o:function(){var e=i.n(),t=i.W(),n=i.Y();return n+(e===12&&t<9?1:e===1&&t>9?-1:0)},Y:function(){return r.getFullYear()},y:function(){return i.Y().toString().slice(-2)},a:function(){return r.getHours()>11?"pm":"am"},A:function(){return i.a().toUpperCase()},B:function(){var e=r.getUTCHours()*3600,t=r.getUTCMinutes()*60,n=r.getUTCSeconds();return a(Math.floor((e+t+n+3600)/86.4)%1e3,3)},g:function(){return i.G()%12||12},G:function(){return r.getHours()},h:function(){return a(i.g(),2)},H:function(){return a(i.G(),2)},i:function(){return a(r.getMinutes(),2)},s:function(){return a(r.getSeconds(),2)},u:function(){return a(r.getMilliseconds()*1e3,6)},e:function(){throw"Not supported (see source code of date() for timezone on how to add support)"},I:function(){var e=new Date(i.Y(),0),t=Date.UTC(i.Y(),0),n=new Date(i.Y(),6),r=Date.UTC(i.Y(),6);return e-t!==n-r?1:0},O:function(){var e=r.getTimezoneOffset(),t=Math.abs(e);return(e>0?"-":"+")+a(Math.floor(t/60)*100+t%60,4)},P:function(){var e=i.O();return e.substr(0,3)+":"+e.substr(3,2)},T:function(){return"UTC"},Z:function(){return-r.getTimezoneOffset()*60},c:function(){return"Y-m-d\\TH:i:sP".replace(o,u)},r:function(){return"D, d M Y H:i:s O".replace(o,u)},U:function(){return r/1e3|0}};this.date=function(e,t){n=this;r=t===undefined?new Date:t instanceof Date?new Date(t):new Date(t*1e3);return e.replace(o,u)};return this.date(e,t)}
Developer | Gabriel |
Username | gab |
Uploaded | July 18, 2022 |
Rating | 3 |
Size | 3,589 Kb |
Views | 22,264 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Vcard dev | 3,138 Kb |
Font awesome Hamburger-Menu-Toggle | 2,191 Kb |
Animated Trash Icon pure CSS | 3,853 Kb |
Inline editing with jquery | 2,576 Kb |
Loggy.js - CSS formatted JS console logs | 2,204 Kb |
Picture overlay | 2,450 Kb |
A Pen by Gabriel | 2,459 Kb |
LocalStorage Test | 2,927 Kb |
HINT.css - just a little test | 1,926 Kb |
Image rendering | 2,422 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Single element checkbox | Ivijaygupta | 1,996 Kb |
Cut and Paste Roll Link | BottomlineInteractive | 2,546 Kb |
BenU Maintenance Site | Ksherman | 4,893 Kb |
Playing with transition timing | Mattgrosswork | 1,993 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
Placeholder support for contentEditable elements, without JavaScript | Flesler | 1,863 Kb |
NeeilTimer | Neeilan | 2,836 Kb |
Fluid Grid 12 | Alexoliverwd | 2,309 Kb |
Button fills | Zubfatal | 5,205 Kb |
A Pen by Miro Olma | Programiro | 2,342 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!