【问题标题】:How can i collapse all objects in JSON view in firefox如何在 Firefox 中折叠 JSON 视图中的所有对象
【发布时间】:2013-10-17 17:02:37
【问题描述】:

我正在使用http://jsonview.com/ 在浏览器中查看 josn。

默认情况下,它显示所有对象展开。有什么办法可以折叠,一键展开全部,或者默认展开。

我有 100 个对象,单击 + 或 - 图标非常耗时

【问题讨论】:

    标签: javascript html json firefox firefox-addon


    【解决方案1】:

    浏览the code后,显然没有这个功能,所以you may ask the author to add it

    【讨论】:

      【解决方案2】:

      您也可以将其粘贴到您的控制台中

      `(function(nodes){ for(index in nodes) { node = nodes[index]; if (node.hasOwnProperty('className')) node.className = 'hoverable collapsed' } })($$('.hoverable'))`
      

      它应该可以解决问题!

      【讨论】:

        猜你喜欢
        • 2013-06-12
        • 2019-02-13
        • 1970-01-01
        • 2019-06-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-01-29
        • 2020-04-25
        相关资源
        最近更新 更多