Greasy Fork is available in English.

知乎回答全部显示

enter something useful

< Feedback on 知乎回答全部显示

Question/comment

§
Posted: 19 Desember 2014

装上之后,点击登录无法显示知乎登录框

RT

§
Posted: 19 Desember 2014

因为这是脚本的实现方式,防止单击内容后弹出登录框。

§
Posted: 20 Desember 2014

因为这是脚本的实现方式,防止单击内容后弹出登录框。

额,那我登陆知乎之前还得先取消使用此脚本。。。然后再启用。。。

§
Posted: 20 Desember 2014
localStorage['ExpandLimit::expandCount'] = -99999999;

执行一次,不用脚本也能无限制展开答案(

要是闲着没事做也可以这样(

// ==UserScript==
// @name        知乎允许不登录展开
// @namespace   org.jixun.zhihu.guest.expand
// @description 允许非登录用户展开详细答案, 非强制一次性全开
// @include     http://zhihu.com/question/*
// @include     http://www.zhihu.com/question/*
// @version     1
// @grant       none
// ==/UserScript==

// 方案1: 简单粗暴
(function (doMethod1) {
    if (doMethod1) localStorage['ExpandLimit::expandCount'] = -99999999;
})(false);

// 方案2: 挂接原始检查函数
(function (doMethod2) {
    if (!doMethod2) return ;

    var dE = window.zhihu.Ct.prototype.dispatchEvent;
    window.zhihu.Ct.prototype.dispatchEvent = function (eventName) {
        if (eventName == 'beforeexpand') return true;

        return dE.apply (this, arguments);
    };
})(false);

// 方案3: 利用公开的函数进行赋值
(function (doMethod3) {
    if (doMethod3) window.zhihu.Xi.create('ExpandLimit').Yd('expandCount', -99999999);
}) (false);

// 终极方案: 去掉类名
(function (doMethodUltimate) {
    window.$('.fixed-summary').removeClass('fixed-summary')
})(true);
§
Posted: 21 Desember 2014
localStorage['ExpandLimit::expandCount'] = -99999999;

执行一次,不用脚本也能无限制展开答案(

要是闲着没事做也可以这样(

// ==UserScript==
// @name        知乎允许不登录展开
// @namespace   org.jixun.zhihu.guest.expand
// @description 允许非登录用户展开详细答案, 非强制一次性全开
// @include     http://zhihu.com/question/*
// @include     http://www.zhihu.com/question/*
// @version     1
// @grant       none
// ==/UserScript==

// 方案1: 简单粗暴
(function (doMethod1) {
    if (doMethod1) localStorage['ExpandLimit::expandCount'] = -99999999;
})(false);

// 方案2: 挂接原始检查函数
(function (doMethod2) {
    if (!doMethod2) return ;

    var dE = window.zhihu.Ct.prototype.dispatchEvent;
    window.zhihu.Ct.prototype.dispatchEvent = function (eventName) {
        if (eventName == 'beforeexpand') return true;

        return dE.apply (this, arguments);
    };
})(false);

// 方案3: 利用公开的函数进行赋值
(function (doMethod3) {
    if (doMethod3) window.zhihu.Xi.create('ExpandLimit').Yd('expandCount', -99999999);
}) (false);

// 终极方案: 去掉类名
(function (doMethodUltimate) {
    window.$('.fixed-summary').removeClass('fixed-summary')
})(true);

太牛了,不过用个脚本,还不如登入一下。

§
Posted: 22 Desember 2014
localStorage['ExpandLimit::expandCount'] = -99999999;

执行一次,不用脚本也能无限制展开答案(

要是闲着没事做也可以这样(

// ==UserScript==
// @name        知乎允许不登录展开
// @namespace   org.jixun.zhihu.guest.expand
// @description 允许非登录用户展开详细答案, 非强制一次性全开
// @include     http://zhihu.com/question/*
// @include     http://www.zhihu.com/question/*
// @version     1
// @grant       none
// ==/UserScript==

// 方案1: 简单粗暴
(function (doMethod1) {
    if (doMethod1) localStorage['ExpandLimit::expandCount'] = -99999999;
})(false);

// 方案2: 挂接原始检查函数
(function (doMethod2) {
    if (!doMethod2) return ;

    var dE = window.zhihu.Ct.prototype.dispatchEvent;
    window.zhihu.Ct.prototype.dispatchEvent = function (eventName) {
        if (eventName == 'beforeexpand') return true;

        return dE.apply (this, arguments);
    };
})(false);

// 方案3: 利用公开的函数进行赋值
(function (doMethod3) {
    if (doMethod3) window.zhihu.Xi.create('ExpandLimit').Yd('expandCount', -99999999);
}) (false);

// 终极方案: 去掉类名
(function (doMethodUltimate) {
    window.$('.fixed-summary').removeClass('fixed-summary')
})(true);
太牛了,不过用个脚本,还不如登入一下。

没事做 瞎折腾(

Post reply

Sign in to post a reply.