English 中文(简体)
Greasemonkey: 摘录
原标题:Greasemonkey: Remove event handler added by plugin

I m 试图将一个“滚动器”的纸浆添加到一页。

The page is this: http://www.nacion.com/2012-05-15/Mundo/nobel-de-economia-cree-posible-pronta-desaparicion-de-zona-euro-.aspx

Basically I want that when I use the down/up arrows on my keyboard the page goes down instead of the small box where the plugin is applied. I tried getting an instance of the plugin but for some reason it is not available once the page is loaded.

另一种做法是,在装上纸面之前必须装上 gr子(因此我可以用 gr子去除),但我不知道这是否甚至可能。

Any idea would be appreciated.

成就

最佳回答

该页似乎使用了“jQueryTOOLS Scrollable

The lousy UI experience is triggered by this code in the main page:

<script>
    // initialize scrollable para ademas
    jQuery(document).ready(function() {
        $("div.scroller_ademas").scrollable({
            size: 1,
            items:  #ademasaldea ,
            vertical: true
        }).mousewheel({
            items:  #ademasaldea 
        });
    });
</script>

And all the unbind() calls and keyboard = false sets that should work, don t affect the keyboard hijack!

幸运的是,违法行为的<代码>和t;script>是相当的原子,因此Greasemonkey可以阻止对联合材料的犯罪,而不会影响任何其他因素。

Block the JS by using the stunningly-brilliant checkForBadJavascripts utility.

与此类似:

// ==UserScript==
// @name        _Block scrollable that s run amuck.
// @namespace   _pc
// @include     http://www.nacion.com/*
// @run-at      document-start
// @require     https://gist.github.com/raw/2620135/checkForBadJavascripts.js
// ==/UserScript==

checkForBadJavascripts ( [
    [false, /items:s+ #ademasaldea /, null]
] );

请注意,这也将阻止“El Mundo的Ademas en El Mundo”箱的滚动作用,但可以通过添加这一词语来确定。

window.addEventListener ("load", function () {
    GM_addStyle ( #ademasaldea { height: 100%; overflow-y: scroll; } );
}, false);

to the script.

问题回答

暂无回答




相关问题
Listen for Events from Browser "Find" Window in JavaScript

Is there a way to listen for typing into the browser s "find" window in JavaScript? (source: apple.com) I d like to be able to reinterpret the search text from JavaScript. What do I need to ...

Equivalent of PreviewKeyDown of C# needed for native C++/MFC

I used a ActiveXControl in a C# Forms application and had the possibility to implement a PreviewKeyDown event handler for that ActiveXControl. That was needed to specify that, e.g. the [ALT] key, is ...

Refresh the UI in gwt

I have created some custom composite widget, which listens to an events (in my case loginEvent). Once the event is caught the state of the widget changes so as the way it should look (in my case I ...

How to remove "onclick" with JQuery?

PHP code: <a id="a$id" onclick="check($id,1)" href="javascript:void(0)" class="black">Qualify</a> I want to remove the onclick="check($id,1) so the link cannot be clicked or "check($id,...

热门标签