사용자:LL/common.js

< 사용자:LL
Leia0207 (토론 | 기여)님의 2017년 11월 24일 (금) 00:55 판 (Leia0207님이 사용자:주홍빛/common.js 문서를 사용자:LL/common.js 문서로 이동했습니다: "주홍빛" 사용자를 "LL" 사용자로 바꾸면서 문서를 자동으로 옮겼습니다)

참고: 설정을 저장한 후에 바뀐 점을 확인하기 위해서는 브라우저의 캐시를 새로 고쳐야 합니다.

  • 파이어폭스 / 사파리: Shift 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5 또는 Ctrl-R을 입력 (Mac에서는 ⌘-R)
  • 구글 크롬: Ctrl-Shift-R키를 입력 (Mac에서는 ⌘-Shift-R)
  • 인터넷 익스플로러 / 엣지: Ctrl 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5를 입력.
  • 오페라: Ctrl-F5를 입력.
$( function() {
'use strict';

$( 'body' ).append( '<span id="to-top" style="font-size:20pt; color:pink;"   >△</span>' );
var $topButton = $( '#to-top' );

$topButton.css( {
	'color': 'black',
	'position': 'fixed',
	'bottom': '-30px',
	'left': '4px',
	'cursor': 'pointer',
	'transition': 'bottom 0.5s',
	'-webkit-transition': 'bottom 0.5s',
	'user-select': 'none',
	'-webkit-user-select': 'none',
	'-moz-user-select': 'none',
	'-ms-user-select': 'none'
} ).click( function() {
	$(searchform.searchInput.value = "리브레 위키");
} );

$( window ).scroll( function() {
	if ( $( window ).scrollTop() > 100 ) {
		$topButton.css( 'bottom', '4px' );
	} else {
		$topButton.css( 'bottom', '-30px' );
	}
} );
} );
$( function() {
'use strict';

$( 'body' ).append( '<span id="to-bottom" style="font-size:20pt; color:pink;"  >▽</span>' );
var $bottomButton = $( '#to-bottom' );
var height=document.body.scrollHeight;
var hminus=document.body.scrollHeight-"650";
$bottomButton.css( {
	'color': 'black',
	'position': 'fixed',
	'bottom': '-30px',
	'left': '42pt',
	'cursor': 'pointer',
	'transition': 'bottom 0.5s',
	'-webkit-transition': 'bottom 0.5s',
	'user-select': 'none',
	'-webkit-user-select': 'none',
	'-moz-user-select': 'none',
	'-ms-user-select': 'none'
} ).click( function() {
	$( 'html, body' ).animate( { scrollTop:height}, 'slow' );
} );

$( window ).scroll( function() {
	if ( $( window ).scrollTop () <hminus ) {
		$bottomButton.css( 'bottom', '4px' );
	} else {
		$bottomButton.css( 'bottom', '-30px' );
	}
} );
} );