var hash = "#foo"
- pushState(1, null, hash)
- click internal link
<a href="foo">
- hisotory.state losts in FF
/** | |
getScrollTopMax | |
@test | |
https://developer.mozilla.org/ja/docs/DOM/element.clientHeight | |
*/ | |
var target = document.getElementById("idDiv") | |
target.scrollHeight // 401 | |
target.clientHeight // 102 | |
target.scrollTopMax // 299 |
/** | |
* easing | |
* @param t current time | |
* @parm d duartion (total time) | |
* @return 0 - 1 | |
*/ | |
/* | |
weeker | |
Sine |
/* | |
make btn#selectPre | |
click -> select pre-content | |
remake - if webkit support mouseenter | |
*/ | |
;(function(d){ | |
if(!window.getSelection){ | |
return |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | |
<title>remove dot</title> | |
<link rel="stylesheet" href="no-dot.css" type="text/css" /> | |
</head> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<title>body scroll in Standards Mode</title> | |
<style> | |
html{ | |
height: 100%; | |
overflow: hidden; | |
} |
// ==UserScript== | |
// @name Save Indent - Better Copy for Github, Gist, google-code-prettify | |
// @namespace https://gist.github.com/7cc | |
// @description save indent/whitespace when copy source code / コピーした際のインデントを正常化する | |
// @include * | |
// @exclued https://www.google* | |
// @exclued https://www.youtube.com/* | |
// @version 2.03 | |
// @grant none | |
// ==/UserScript== |
!function(){ | |
// http://javascripter.hatenablog.com/entry/20081103/1225682273 | |
var last | |
(function check(){ | |
var xhr = new XMLHttpRequest | |
var url = location.href | |
xhr.open("GET", url, true) | |
xhr.onload = function(){ | |
if ( !last || last === xhr.response ) { |
[draggable=true]{ | |
position: absolute; | |
top: 50px; | |
cursor: move; | |
box-shadow: 4px 0px 12px; | |
padding: .25em .5em | |
} |