This file has been truncated, but you can view the full file.
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
const popular_words = [ | |
'123456', | |
'123456789', | |
'qwerty', | |
'password', | |
'111111', | |
'12345678', | |
'abc123', | |
'1234567', | |
'password1', |
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
const http = require('https'); | |
const postToSlack = (data) => { | |
const host = 'hooks.slack.com'; | |
const hookUrl = 'slack hook path'; | |
return new Promise((resolve, reject) => { | |
const options = { | |
host, | |
path: hookUrl, | |
method: 'POST', |
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
const roundNumber = (number, decimlPlaces) => { | |
return Number((Math.round(number + `e${decimlPlaces}`)) + `e-${decimlPlaces}`); | |
} | |
exports.handler = async (event) => { | |
const { number, places } = JSON.parse(event.body); | |
if (isNaN(number) || isNaN(places)) { | |
throw new Error('Invalid input supplied'); | |
} | |
const answer = roundNumber(number, places); |
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
const roundNumber = (number, decimlPlaces) => { | |
return Number((Math.round(number + `e${decimlPlaces}`)) + `e-${decimlPlaces}`); | |
} | |
exports.handler = async (event) => { | |
const number = 4.356; | |
const decimalPlaces = 2; | |
const answer = roundNumber(number, decimalPlaces); | |
const response = { |
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
{ | |
"manifest_version": 2, | |
"name": "Social Media Screentime", | |
"description": "Control how much time you invest in social media", | |
"short_name": "social media screentime", | |
"version": "1.0", | |
"browser_action": { | |
"default_popup": "index.html" | |
}, | |
"background": { |
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
<template> | |
<div class="content"> | |
<chart /> | |
</div> | |
</template> | |
<script> | |
import Chart from './chart'; | |
export default { |
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
import { HorizontalBar } from 'vue-chartjs'; | |
export default { | |
extends: HorizontalBar, | |
methods: { | |
getData() { | |
const currentDate = new Date().toISOString().substr(0, 10); | |
return new Promise((resolve) => { | |
chrome.storage.local.get(currentDate, result => { | |
return result[currentDate] ? resolve(result[currentDate]) : resolve({}); |
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
const urls = [ | |
'*://*.facebook.com/', | |
'*://*.twitter.com/', | |
'*://*.youtube.com/', | |
'*://*.instagram.com/' | |
] | |
const STORAGE = chrome.storage.local; | |
let active = {}; |
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
const urls = [ | |
'*://*.facebook.com/', | |
'*://*.twitter.com/', | |
'*://*.youtube.com/', | |
'*://*.instagram.com/' | |
] | |
let active = {}; | |
const end = () => { |
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
{ | |
"manifest_version": 2, | |
"name": "Social Media Screentime", | |
"description": "Control how much time you invest in social media", | |
"short_name": "social media screentime", | |
"version": "1.0", | |
"browser_action": { | |
"default_popup": "index.html" | |
}, | |
"background": { |
NewerOlder