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
<!-- | |
Example shows functionality of: | |
- saving JSON (appState) to Google Drive | |
- updating Google Drive file if file with such filename exists | |
- retrieving saved data from file with ID saved in localStogare (picker may be used instead: https://developers.google.com/picker/docs/ ) | |
Used google tutorial examples: | |
https://developers.google.com/drive/web/quickstart/quickstart-js | |
https://developers.google.com/drive/v2/reference/files/get | |
https://developers.google.com/drive/v2/reference/files/update |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<a href='https://output.jsbin.com/dunira'>JS Bin</a> | |
<textarea id="src" cols="30" rows="10">.err input, .err select, input.err, select.err {border-color: rgba(#d40f0f, 0.5); color: #f0f;} |
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 () { | |
var css = `#e404h_overlay {position:fixed; bottom:0; width:80%; max-height:200px; overflow:auto; padding:15px;}.e404h_i:hover {background: rgba(255,0,0,.2); cursor:pointer;}.e404h_i.e404h_hidden {opacity:.2; cursor:not-allowed;}.e404h_i.e404h_hidden::after {content:' [hidden]';}.e404h_h1 {font-size: 30px; line-height: 1.1;}.e404h_h2 {font-size: 25px; line-height: 1.1;}.e404h_h3 {font-size: 20px; line-height: 1.2;}.e404h_h4 {font-size: 17px; line-height: 1.3;}.e404h_h5 {font-size: 14px; line-height: 1.3;}.e404h_h6 {font-size: 11px; line-height: 1.3;}.e404h_hlight {box-shadow: 0 0 3px 1px #f00;}`; | |
var html = ''; | |
var headings = document.querySelectorAll('h1,h2,h3,h4,h5,h6'); | |
var heads = []; | |
for (var i = 0; i < headings.length; i++) { | |
heads.push({ | |
tag: headings[i].tagName.toLowerCase(), | |
text: headings[i].textContent.trim(), | |
elem: headings[i] |
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
// https://github.com/watching | |
[...document.querySelectorAll('.repo-list > li .select-menu-modal .select-menu-list button:first-child')].forEach(el => el.click()); | |
setTimeout(()=>{ window.location.reload(); }, 1000); |