Skip to content

Instantly share code, notes, and snippets.

@parkjinwoo
Last active January 25, 2018 17:37
Show Gist options
  • Save parkjinwoo/6162125 to your computer and use it in GitHub Desktop.
Save parkjinwoo/6162125 to your computer and use it in GitHub Desktop.
Naver Drag
javascript: function naver(q){ void(z=q.body.appendChild(q.createElement('script'))); void(z.language='javascript'); void(z.type='text/javascript'); void(z.src='http://userscripts.org/scripts/source/61326.user.js');} function selfw(w) { try{naver(w.document);} catch(e){} for (var i =0; i <w.frames.length; i++) { try{ selfw(w.frames[i]); } catch(e){} } } selfw(self);(function() { var e, i, all; document.onselectstart = null; document.oncontextmenu = null; all = document.getElementsByTagName("*"); for (i = 0; i < all.length; i += 1) { e = all[i]; e.onselectstart = null; e.oncontextmenu = null; } })();
javascript: function naver(q){ void(z=q.body.appendChild(q.createElement('script'))); void(z.language='javascript'); void(z.type='text/javascript'); void(z.src='https://gist.github.com/parkjinwoo/6162125/raw/9c2352402874bb267ba6f6f2ccd904f7567188de/userscript.js');} function selfw(w) { try{naver(w.document);} catch(e){} for (var i =0; i <w.frames.length; i++) { try{ selfw(w.frames[i]); } catch(e){} } } selfw(self);(function() { var e, i, all; document.onselectstart = null; document.oncontextmenu = null; all = document.getElementsByTagName("*"); for (i = 0; i < all.length; i += 1) { e = all[i]; e.onselectstart = null; e.oncontextmenu = null; } })();
// ==UserScript==
// @name Anti-Disabler for Naver
// @namespace http://userscripts.org/users/dyhan81
// @description The script allows users to call the context menu or select the texts in Naver, and when you copy text, script will get rid of a annoying source indication.
// @include http://blog.naver.com/*
// @include http://cafe.naver.com/*
// @copyright 2009+, Dong-yoon Han (http://cb-dyhan81.blogspot.com)
// @license (CC) Attribution Non-Commercial Share Alike; http://creativecommons.org/licenses/by-nc-sa/2.0/kr/
// @version 1258306524556; Mon Nov 16 2009 02:35:24 GMT+0900
// @injectframes 1
// ==/UserScript==
(function(){
var intervalID;
var domain = window.location.host;
// For Blog
if (domain.toLowerCase().indexOf("blog.")>-1)
{
intervalID = setInterval(" \
if(window.AutoSourcing != null) \
{ \
AutoSourcing.setEnable(false); \
} \
\
if(window.utility != null) \
{ \
utility.detachSelectPrevent(); \
} \
", 500);
setTimeout("clearInterval("+intervalID+");", 3000);
}
/* For Cafe */
if (domain.toLowerCase().indexOf("cafe.")>-1)
{
intervalID = setInterval(" \
if(window.AutoSourcing != null) \
AutoSourcing.setEnable(false); \
\
var alternativeCancelBlockMouseRight = function(theElement) \
{ \
var trueFunc = function() \
{ \
return true; \
}; \
\
theElement.oncontextmenu = trueFunc; \
theElement.onselectstart = trueFunc; \
theElement.ondragstart = trueFunc; \
}; \
\
if(window.CancelBlockMouseRight != null) \
{ \
CancelBlockMouseRight(); \
cancelBlockDragInFF(); \
} \
\
if(window.mlayoutPhoto != null) \
{ \
alternativeCancelBlockMouseRight(parent.document); \
alternativeCancelBlockMouseRight(window.mlayoutPhoto.oView); \
window.mlayoutPhoto.opt.allowRightMouseClick = true; \
} \
",500);
setTimeout("clearInterval("+intervalID+");", 3000);
intervalID = setInterval(" \
if( document.getElementById('content-area') \
&& (document.getElementById('content-area').oncontextmenu != null))\
{ \
document.getElementById('content-area').oncontextmenu = null; \
document.getElementById('content-area').onselectstart = null; \
document.getElementById('content-area').ondragstart = null; \
} \
", 500);
setTimeout("clearInterval("+intervalID+");", 3000);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment