Skip to content

Instantly share code, notes, and snippets.

@incleaf
incleaf / tweak.js
Last active October 21, 2019 04:34
var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);
var isAndroid = /android/i.test(navigator.userAgent) && !isTrident;
var isOtherFocusing = false;
/**
* @param {number} offsetY
*/
function scrollTo(offsetY) {
Promise.resolve(null).then(function () {
@incleaf
incleaf / snippet.js
Created December 18, 2018 07:32
대학교 안전교육 스킵
$.ajax({
type: 'POST',
url: '/ushm/edu/contentsViewAviProcessCheckSub',
data: {
scheduleMemberProgressNo: window.location.href.match(/scheduleMemberProgressNo=(.*)/)[1],
currentTime: 3000,
isEnd: true,
isMobile: true
}
});
@incleaf
incleaf / withQueryString.tsx
Last active July 23, 2018 01:49
React Router v4 Querystring HOC in TypeScript
import * as qs from 'qs';
import * as React from 'react';
import { pick, merge } from 'lodash-es';
import { RouteComponentProps, withRouter } from 'react-router';
import { Subtract } from 'app/types';
interface QueryString {
[key: string]: string;
import { StyleSheet, ViewStyle, TextStyle } from 'react-native'
interface Styles {
wrapper: ViewStyle
text: TextStyle
}
const styles = StyleSheet.create<Styles>({
wrapper: {
width: 68,