Skip to content

Instantly share code, notes, and snippets.

View item4's full-sized avatar
:shipit:
Sick

item4(Kim Jinsu) item4

:shipit:
Sick
View GitHub Profile
@item4
item4 / bookmark.js
Created May 13, 2021 05:44
Unlock preventing drag, select, right click
// add this to your bookmark
javascript:(() => {
const events = ['contextmenu', 'drag', 'dragstart', 'selectstart', 'copy', 'cut'];
const styles = ['user-select', '-webkit-user-select', '-moz-user-select', '-ms-user-select', 'pointer-events', '-webkit-pointer-events', '-moz-pointer-events', '-ms-pointer-events'];
events.forEach(event => { window.addEventListener(event, e => {e.stopImmediatePropagation();}, true) });
document.querySelectorAll('body, body *').forEach(el => { styles.forEach(style => { el.style[style] = 'auto !important'; }); });
})();

Keybase proof

I hereby claim:

  • I am item4 on github.
  • I am item4 (https://keybase.io/item4) on keybase.
  • I have a public key ASBOuLJaLMgYJInhmh9XQ3Dmxc544erEsPTxI0LUK-SchQo

To claim this, I am signing this object:

@item4
item4 / b64-redirect.html
Created September 13, 2018 08:28
b64-redirect for yui
<!doctype html>
<html>
<script>
window.location.replace(atob(decodeURIComponent(window.location.search.split('=', 2)[1]).replace(/_/g, '/').replace(/-/g, '+')));
</script>
</html>
@item4
item4 / toy.py
Last active August 29, 2015 14:25 — forked from sanxiyn/toy.py
Python subset
"""
a = 1
b = 1
i = 2
n = 10
while i < n
c = a + b
a = b
b = c
i = i + 1
@item4
item4 / bash_profile.sh
Created July 1, 2015 10:24
Open man page as pdf
# add it yourself
my_man2() {
man -t $1 | open -f -a /Applications/Preview.app
}
alias man2=my_man2