Skip to content

Instantly share code, notes, and snippets.

@Rplus
Rplus / index.html
Last active November 6, 2018 08:03
check-position
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>+ position</title>
<script src="main.js" defer></script>
<style>
body {
@Rplus
Rplus / css-loader.css
Created October 20, 2018 19:50
CSS loader with Braille Patterns dots
@keyframes waiting {
0%, 100% { content: '⠇'; }
16% { content: '⠋'; }
32% { content: '⠙'; }
48% { content: '⠸'; }
64% { content: '⠴'; }
80% { content: '⠦'; }
}
<script src="https://unpkg.com/react@15/dist/react.min.js"> </script><script src="https://unpkg.com/react-dom@15/dist/react-dom.min.js">
</script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<div id="root"></div>
<script type="text/babel">
class Hello extends React.Component {
constructor(){
super();
@Rplus
Rplus / 撈卡提諾文章.js
Created March 26, 2018 17:28
壞小孩撈卡提諾文章…
let getUrl = (page) => `https://ck101.com/forum.php?mod=viewthread&tid=1762239&extra=&page=${page}`;
let toTxt = (d) => d.text();
let hr = '\n\n=====\n\n';
let getContent = (html) => {
let doc = document.implementation.createHTMLDocument();
doc.body.innerHTML = html;
return [...doc.querySelectorAll('.t_f')].map(i => i.textContent).join(hr);
};
let save = (page, text) => {
console.log(`save page ${page}`);
// getDeepProp({a: {b: 3}}, 'a.b') => 3
export function getDeepProp(obj, deepProp, splitChar = '.') {
return deepProp.split(splitChar).reduce((_obj, _deepProp) => _obj && _obj[_deepProp], obj);
}
@Rplus
Rplus / Codepen details.js
Last active February 9, 2018 13:54
bookmarklet(s) in browser
// get codepen stats in `/pen/` & `/full/` page
/* globals fetch */
javascript: (function () {
var dialogId = 'stat-dialog';
var dialog = document.getElementById(dialogId);
if (!dialog) {
dialog = document.createElement('dialog');
dialog.id = dialogId;
dialog.style.position = 'fixed';
@Rplus
Rplus / wecatch-auto-refresh.js
Created January 28, 2018 07:02
wecatch-auto-refresh
window.log = {};
const timeInterval = 5.5; // minute(s)
const filters = {
'/B/': 'iv80+',
'/G/': 'iv90+',
'/W/': 'iv0',
'/R/': 'iv100',
'/349.': '醜醜魚',
};
var checkGoodItems = () => {
@Rplus
Rplus / Medium picture.html
Last active January 16, 2018 00:06
Medium picture figure snippet
<figure name="322b" id="322b" class="graf--figure graf-after--h3">
<div class="aspectRatioPlaceholder is-locked" style="max-width: 700px; max-height: 389px;">
<div class="aspect-ratio-fill" style="padding-bottom: 55.60000000000001%;"></div>
<div class="progressiveMedia js-progressiveMedia graf-image"
data-image-id="1*vRzbJmu0VC5yWRWbc7d-0w.png"
data-width="955" data-height="531"
data-action="zoom" data-action-value="1*vRzbJmu0VC5yWRWbc7d-0w.png">
@Rplus
Rplus / .gitignore
Last active January 1, 2018 08:41
Pokamon CP[2018-01]
*.map
prepros-6.config
@Rplus
Rplus / index.html
Last active December 31, 2017 07:53
Pokémons' CP Calculator [Vue] -- https://codepen.io/Rplus/full/POMKVv/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>max CP by level Pokémons</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<h1 class="intro">Pokémons' CP calculator<small>vue version</small></h1>