Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 01) Happy CSSer - 1.md
Last active December 25, 2017 16:32
ironman - 2018
@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>
@Rplus
Rplus / css-variables-width-x-height-area-1-2.markdown
Last active November 6, 2017 16:02
CSS Variables: width x height = area (1/2)
@Rplus
Rplus / Happy-CSSer-cover.html
Created August 25, 2017 17:08
Happy CSSer custom cover
<html>
<head>
<style id="webmakerstyle">
.cover {
position: relative;
width: 1000px;
height: 524px;
margin: 0 auto;
@Rplus
Rplus / bling.js
Created July 12, 2017 16:39 — forked from paulirish/bling.js
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@Rplus
Rplus / Spread Operator.md
Created February 6, 2017 18:12
6 Great Uses of the Spread Operator, via: https://davidwalsh.name/spread-operator

Calling Functions without Apply

function doStuff (x, y, z) { }
var args = [0, 1, 2];
doStuff(...args);
function doStuff(x, y, z) {}
var args = [0, 1, 2];