Code Monkey home page Code Monkey logo

Comments (32)

obgnail avatar obgnail commented on August 13, 2024 1

简单来说,其他的功能都是通过合法的手段添加的,但是多标签页功能是利用 Typora 的漏洞实现的(准确来说是 Typora 使用的
electron 框架的漏洞)。
高版本的 Typora 已经补上了这个漏洞(更新了 electron 版本),具体的原理可以一下 readme 的 【脚本会失效吗】章节。

我这两天会研究一下怎么解决。不好意思 :(

from typora_plugin.

yangyunzhao avatar yangyunzhao commented on August 13, 2024

最期待这个功能,结果被官方修复了。朋友,加油!!

from typora_plugin.

want-u avatar want-u commented on August 13, 2024

同期待,或者作者大大哪个版本的Typora是支持的,我去用历史版本体验下
1E0E3CAB

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

@want-u

Typora 版本太多了,我也不知道哪个版本更新了 electron 版本。所以多标签页功能现在直接被我限制了只能低于 1.0.0 版本。

我个人使用的是 0.9.98。应该没有人比我更旧了 :)

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

@echo0218 @yangyunzhao @want-u

还有一件事想问问各位:

我找到一个多标签页功能的实现方法,这种方法可用于高版本。

但是有个缺陷:无法用于【untitled 文件】(就是 ctrl+N 新建的窗口),也就是说,多标签页只能用于真实保存在本地的文件。
各位能接受么?

from typora_plugin.

want-u avatar want-u commented on August 13, 2024

很巧,我使用的是和作者大大一样的版本,原来是在新窗口打开就可以(悟了)

另外作者大大的新方式我个人觉得没什么问题,目前没有标签页的使用习惯是创建好文件才开始编辑,想来并不影响

from typora_plugin.

want-u avatar want-u commented on August 13, 2024

不知作者大大是否有想法在标签页上,加个关闭当前标签页的功能?

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

不知作者大大是否有想法在标签页上,加个关闭当前标签页的功能?

功能做了,添加了 HIDE_CLOSE_BUTTON 选项。你更新一下。

不过该选项默认为 true(我一般都用快捷键),需要你自行把文件 window_tab_drag.js 的 HIDE_CLOSE_BUTTON 选项设置为 false。

使用有问题可以提个 issue。

from typora_plugin.

want-u avatar want-u commented on August 13, 2024

好嘞~先前看了一遍配置文件还是没注意到hhh,感谢作者大大耐心回答

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

好嘞~先前看了一遍配置文件还是没注意到 hhh,感谢作者大大耐心回答

额……你要更新一下代码,是我今天临时加上去的

from typora_plugin.

Bronya-Rayi avatar Bronya-Rayi commented on August 13, 2024

师傅可以看看这个多标签页功能的typora插件,亲测最新版可用:https://github.com/gatziourasd/typora-tabbar-plugin

from typora_plugin.

Bronya-Rayi avatar Bronya-Rayi commented on August 13, 2024

功能比较全,也比较稳定
image

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

功能比较全,也比较稳定 image

感谢反馈。

看了一下作者的方法,和我上面说的方法是一样的,都是通过打开【现有的文件】实现切换的,这样方式是无法用于【untitled 文件】(就是 ctrl+N 新建的窗口)。

作者比我更*的是,强行将 Typora 的多窗口放到一个窗口,实现真正意义的多标签管理。这是我确实没有想到的,确实很酷。

这同时也带来了副作用,像【ctrl+点击 左侧栏的文件】,【鼠标点击 ctrl+p 的搜索结果】,【ctrl+N】这些在后端新建窗口的操作都是有问题的。

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

我的方式是通过劫持 electron 示例,获取到每个窗口的 ID,然后调用窗口的 focus 方法实现的切换,这样的话,无论是什么窗口都能切换。泛用性高。

缺点就是:

  1. 高版本已经无法使用。
  2. 多窗口,并不是真正意义的多标签管理。

当然,考虑到【左侧栏 ctrl + 点击文件】新建窗口,【鼠标点击 ctrl+p 的搜索结果】这些操作都不太频繁,或许他的方法比我好一些。

我近期有空的话,看能不能一版类似的功能。

from typora_plugin.

Bronya-Rayi avatar Bronya-Rayi commented on August 13, 2024

辛苦师傅了,现在的插件已经解决了不少typora的痛点,能实现稳定的多标签页更是锦上添花

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

@echo0218 @yangyunzhao @want-u @Bronya-Rayi

忙里偷闲,实现了一版高版本Typora可用的标签页管理功能(typora-tabbar-plugin 的重新实现,修复了原脚本的BUG和不适配问题,样式是抄的)

代码文件已上传,你们可以用用看,有问题帮忙提一下。

from typora_plugin.

want-u avatar want-u commented on August 13, 2024

爆赞,体验中,这感觉一下就爱上了!

from typora_plugin.

Bronya-Rayi avatar Bronya-Rayi commented on August 13, 2024

试了一下,目前体验不错,师傅nb

from typora_plugin.

tianyunfari avatar tianyunfari commented on August 13, 2024

为啥我的多标签页不生效
image

from typora_plugin.

tianyunfari avatar tianyunfari commented on August 13, 2024

显示文件数也用不了,哪位大佬可以指点下?,我不懂js,我看默认这些功能都是默认打开的,在我这里却用不了,是我打开姿势不对吗?

from typora_plugin.

Bronya-Rayi avatar Bronya-Rayi commented on August 13, 2024

显示文件数也用不了,哪位大佬可以指点下?,我不懂js,我看默认这些功能都是默认打开的,在我这里却用不了,是我打开姿势不对吗?

我这里是可以的,你看看是不是安装步骤不对,或者开typora的控制台看一下报错

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

@tianyunfari

是只有【显示文件数】和【多标签页】两个功能用不了吗?还是全部功能都用不了?

能不能帮忙看看控制台输出呢?

第一步:点击左上角【文件】,打开偏好设置。 或者快捷键 Ctrl+(逗号)
第二步:在通用中找到高级设置下的 "开启调试模式"
第三步:shift+F12,或者右键--检查元素
第四步:选择第二个标签(Console 或者 控制台)

from typora_plugin.

tianyunfari avatar tianyunfari commented on August 13, 2024

@tianyunfari

是只有【显示文件数】和【多标签页】两个功能用不了吗?还是全部功能都用不了?

能不能帮忙看看控制台输出呢?

第一步:点击左上角【文件】,打开偏好设置。 或者快捷键 Ctrl+(逗号) 第二步:在通用中找到高级设置下的 "开启调试模式" 第三步:shift+F12,或者右键--检查元素 第四步:选择第二个标签(Console 或者 控制台)

image
目前只发现这两个功能不可用

from typora_plugin.

tianyunfari avatar tianyunfari commented on August 13, 2024

看控制台的信息,有几个功能的js注入报错了 @obgnail

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

@tianyunfari

你的 Typora 应该是巨老版本的。大概率比 0.9.98 还低,是吗?

from typora_plugin.

tianyunfari avatar tianyunfari commented on August 13, 2024

@tianyunfari

你的 Typora 应该是巨老版本的。大概率比 0.9.98 还低,是吗?

@obgnail 是的,我的是0.9.86,所以是要升级就可以了吗?现在typora收费了,大佬有安装包吗?

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

@tianyunfari
原因是我用了新的语法特性(艹,语法糖这种东西就不能用)。升级到 0.9.98 这个免费版的就能解决问题,随便搜一下有。

我现在改下插件,如果你不想升级,可以明天再来。

from typora_plugin.

tianyunfari avatar tianyunfari commented on August 13, 2024

@tianyunfari 原因是我用了新的语法特性(艹,语法糖这种东西就不能用)。升级到 0.9.98 这个免费版的就能解决问题,随便搜一下有。

我现在改下插件,如果你不想升级,可以明天再来。

好的。辛苦,麻烦支持下旧版本,感谢

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

@tianyunfari

可以了,麻烦更新一下文件,重新试试。

如果可以,帮忙反馈一下【多关键字查找】功能在你的环境能不能正常工作。
因为上面的语法糖是在 ES 2020 引入的,而多功能查找使用的 async function 是在 ES 2017 引入。我不清楚远古版本的 Typora 是否连 ES2017 都不支持。

from typora_plugin.

tianyunfari avatar tianyunfari commented on August 13, 2024

@tianyunfari

可以了,麻烦更新一下文件,重新试试。

如果可以,帮忙反馈一下【多关键字查找】功能在你的环境能不能正常工作。 因为上面的语法糖是在 ES 2020 引入的,而多功能查找使用的 async function 是在 ES 2017 引入。我不清楚远古版本的 Typora 是否连 ES2017 都不支持。

多标签页功能我更新完已经可以了,多关键字查找功能也是可以的,目前没有问题,给大佬点赞

from typora_plugin.

HexWeaverNova avatar HexWeaverNova commented on August 13, 2024

我用命令行打开非同一个目录的md文件, 还是在新窗口打开的啊, 只有同一个文件夹下的文件才可以用这个功能吗?

from typora_plugin.

obgnail avatar obgnail commented on August 13, 2024

@Gez0377 感谢回复。

  1. 如果要在同一个窗口管理完全不同的目录,目前是不支持的。
  2. typora_plugin 本质是一个前端项目,Typora 并不支持插件功能。实际做法是通过各种绿皮手段(包括但不限于劫持、装饰、覆盖)强行实现功能。使用命令行直接和后端交互,就绕开了 typora_plugin。
  3. 我个人操作是:打开一个很大的目录,然后在这个目录下管理所有文件和子目录。
  4. 除了 vscode,似乎现在市面上的软件都不支持此操作。
  5. 我近期想想办法,看能不能实现这个功能。

from typora_plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.