Skip to content

Instantly share code, notes, and snippets.

@Leo7654
Last active September 12, 2017 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Leo7654/b2cbebf9616e2620ef27be3e8642699d to your computer and use it in GitHub Desktop.
Save Leo7654/b2cbebf9616e2620ef27be3e8642699d to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hack Naver
// @namespace http://tampermonkey.net/
// @downloadURL https://gist.github.com/Leo7654/b2cbebf9616e2620ef27be3e8642699d/raw/6bf20d3fc5faabc1c2b016411c0e6b904509b272/allow_naver.user.js
// @version 0.2
// @description Allow drag Naver
// @author leo
// @match *://*.blog.naver.com/*
// @grant none
// @require http://code.jquery.com/jquery-1.12.4.min.js
// ==/UserScript==
(function($) {
'use strict';
let passEvent = (e) => {
e.stopPropagation();
};
document.body.addEventListener('contextmenu',passEvent, true);
document.body.addEventListener('selectstart',passEvent, true);
document.body.addEventListener('dragstart',passEvent, true);
const ad = $('img[src^="https://weble.net/"]');
console.info(ad);
if (ad.length > 0) {
const banner = $('<div id="banner" class="top"></div>')
.css('left', 0)
.css('width', '100%')
.css('background-color', 'rgba(255, 0, 0, 0.16)')
.css('height', '45px')
.css('position', 'fixed')
.css('top', 0)
.css('z-index', 999999);
$('body').append(banner);
}
})($.noConflict(true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment