This file contains hidden or 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
export default async () => { | |
if (!window.Notification) { | |
console.log('Browser does not support notifications.') | |
return | |
} | |
if (Notification.permission === 'granted') { | |
const not = new Notification('Hi there', { | |
body: 'How are you doing?', | |
icon: 'https://cdn-icons-png.flaticon.com/512/4980/4980801.png' |
This file contains hidden or 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
// Create an array | |
Array.from({ length: 100 }, (v, i) => i) | |
// Copy to clipboard | |
const copyToClipboard = (content) => navigator.clipboard.writeText(content) | |
copyToClipboard("Hello fatfish") | |
// Get mouse selection | |
const getSelectedText = () => window.getSelection().toString() | |
getSelectedText() |
This file contains hidden or 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 | |
function convertToVueI18n($filePath) | |
{ | |
$safeList = [ | |
'getInitials(auth.user?.name)', | |
'item.title', | |
'label', | |
'title', | |
'description', |
OlderNewer