View videoSpeed.js
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
document.querySelector('video').playbackRate = 1.5 |
View firebase-auth-middleware.js
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
'use strict' | |
require('firebase-functions/lib/logger/compat') | |
const functions = require('firebase-functions') | |
const admin = require('firebase-admin') | |
const express = require('express') | |
const cookieParser = require('cookie-parser') | |
const cors = require('cors') | |
try { |
View index.html
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> | |
if (navigator.serviceWorker) { | |
navigator.serviceWorker.register('./sw.js') | |
.catch(function(err) { | |
console.error('Unable to register service worker.', err); | |
}); | |
} | |
</script> |
View sw.js
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
workboxSW.router.registerRoute('https://cdnjs.cloudflare.com/(.*)', workboxSW.strategies.staleWhileRevalidate({}), 'GET'); | |
workboxSW.router.registerRoute('https://res.cloudinary.com/dc3dnmmpx/image/upload/(.*)', workboxSW.strategies.staleWhileRevalidate({}), 'GET'); | |
workboxSW.router.registerRoute('https://unpkg.com/(.*)', workboxSW.strategies.staleWhileRevalidate({}), 'GET'); |
View main.ts
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
@NgModule({ | |
imports: [ | |
BrowserModule, | |
BrowserAnimationsModule, | |
CommonModule, | |
CloudinaryModule.forRoot({Cloudinary}, { cloud_name: 'dc3dnmmpx' } as CloudinaryConfiguration) | |
], | |
declarations: [AppComponent], | |
bootstrap: [AppComponent], |
View manifest.json
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
{ | |
"name": "Cloudinary PWA Angular", | |
"short_name": "Cloudinary PWA", | |
"lang": "en-US", | |
"start_url": "/", | |
"display": "standalone", | |
"theme_color": "#0e2f5a", | |
"background_color": "#0e2f5a", | |
"icons": [ | |
{ |
View sw.js
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
importScripts('https://unpkg.com/workbox-sw@2.0.3/build/importScripts/workbox-sw.prod.v2.0.3.js'); | |
const fileManifest = [ | |
{ | |
"url": "manifest.json", | |
"revision": "df8c1f88f48f4af912acb1e6a8053bfe" | |
}, | |
{ | |
"url": "cloudinary.png", | |
"revision": "df8c1f88f48f4af912acb1e6a8053bfe" |
View funny.js
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
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}funct |
View hideHeader.js
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
$(window).scroll(function() { | |
if ($(this).scrollTop() > 200) { | |
$('#menu').css('display', 'none'); | |
} else { | |
$('#menu').css('display', 'block'); | |
} | |
}); |
View ajaxNode.js
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
var http = require('http'); | |
var server = http.createServer(function (request, response) { | |
function funcOne(input) { | |
var request = require('request'); | |
request.get('http://estruturaorganizacional.dados.gov.br/id/unidade-organizacional/1930', | |
{json: true, body: input}, | |
function(err, res, body) { | |
if (!err && res.statusCode === 200) { | |
console.log(err); |
NewerOlder