next-theme / hexo-theme-next

🎉 Elegant and powerful theme for Hexo.
https://theme-next.js.org
Other
2.48k stars 438 forks source link

求助:Uncaught TypeError: NexT.utils.hasMobileUA is not a function #33

Closed aixiu closed 4 years ago

aixiu commented 4 years ago

Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist


Other Information

https://github.com/theme-next/hexo-next-title/tree/c088c8e8accc46b24210015a88ccfb1099a33403

if (NexT.utils.hasMobileUA()) return;

error:

Uncaught TypeError: NexT.utils.hasMobileUA is not a function

见:https://github.com/theme-next/hexo-next-title/blob/c088c8e8accc46b24210015a88ccfb1099a33403/change-title.swig

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label Bug to this issue, with a confidence of 0.61. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

stevenjoezhang commented 4 years ago

可以将

NexT.utils.hasMobileUA()

替换为

window.screen.width < 992
aixiu commented 4 years ago

@stevenjoezhang 但是源插件没改动,每次更新不是每次都要手动改?源仓库是不是现在没办法更新了。因为使用了github Action,插件,都是自动从源安装的。本地测试,改动是有效的。但需源仓库同步更新。谢谢。

stevenjoezhang commented 4 years ago

也可以把这个插件 fork 一份,改好之后通过以下命令安装

npm i aixiu/hexo-next-title
aixiu commented 4 years ago

好的,谢谢。。

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.