Giter Site home page Giter Site logo

预览链接的问题 about searchjumper HOT 14 CLOSED

YandLiu avatar YandLiu commented on September 27, 2024
预览链接的问题

from searchjumper.

Comments (14)

YandLiu avatar YandLiu commented on September 27, 2024 1

感谢这么细致耐心的解答!只能说搜索酱太强大了!一个小功能就代替掉一个扩展!
现在终于明白了,Firefox默认的CSP好像比Edge严很多
Edge我去掉响应头里的X-Frame-Options就可以
Firefox要在about:config里新建个security.csp.enabled,设置为false,再搭配扩展去掉响应头里的content-security-policyX-Frame-Options,缺一不可

from searchjumper.

hoothin avatar hoothin commented on September 27, 2024

我在规则的描述里有写,需要配合去 cors 扩展使用,例如 Ignore X-Frame headers
你是从小众论坛过来的吧?和那个帖子里的其他扩展一样,但凡是通过 iframe 嵌入来实现功能的扩展都免不了要去除 X-Frame 头。

短短一条是因为在链接上唤出了,这些分类都是对链接生效的。在空白处唤出就是完整的了。
然后 showTips 必须点开分组,你直接在列表里点击是不会生效的。

from searchjumper.

hoothin avatar hoothin commented on September 27, 2024

建议你把链接预览往前挪,然后直接拖拽链接来打开 showTips
如果你想要在固定位置弹出,可以这样写

showTips:
<style>
.search-jumper-tips{
    background: unset;
    box-shadow: unset;
    max-width: unset;
    width: auto;
    top: calc(50vh - 250px) !important;
    left: calc(50vw - 310px) !important;
}
.search-jumper-tips * {
    max-width: unset;
    width: auto;
}
.search-jumper-tips iframe{
    background: #f5f5f5e0;
    box-shadow: 0px 0px 10px 0px #000;
    width: 620px;
    height: 500px;
    resize: auto;
}
</style>
<iframe src="%t"></iframe>

from searchjumper.

YandLiu avatar YandLiu commented on September 27, 2024

需要配合去 cors 扩展使用

已经用了Ignore X-Frame headers,在谷歌搜索页面还是不正常

在空白处唤出就是完整的了

没明白,我想要预览链接不就得在链接上唤出这个条吗?我设置了按住Ctrl+拖拽显示圆盘,但是发现圆盘里的选项很少,没有预览链接这个功能,看脚本设置页面也没懂在哪里才能添加自己想要的功能进圆盘呢。
我通过先把链接拖到笑脸图标上一会,弹出选搜索引擎的这个界面,再拖到预览链接上,但是没反应

图片

还有个问题,预览过的链接不会进入浏览器历史记录中,希望能被历史记录记下来

from searchjumper.

hoothin avatar hoothin commented on September 27, 2024

是的,但是GitHub这个分组有匹配,一旦匹配就会提前分组。
你可以把GitHub这个分组的匹配删除。

圆盘内容不是设置,而是调用的。
你打开设置页不是能看到四个颜色的按钮吗?它们分别代表第一个对应类别的分组,你点进去修改分组内容就能看到圆盘内容变化了。
历史记录这个可以加,我下个版本加上。

from searchjumper.

YandLiu avatar YandLiu commented on September 27, 2024

我觉得Github分组挺好的,没有删除,有没有办法可以使点击1楼第二张图上的链接预览也可以生效呢?
另外我想在Github分组直接复制一个同样的“链接预览”,但是提示不能有同样的站点URL,限制这个的原因是?

from searchjumper.

hoothin avatar hoothin commented on September 27, 2024

可以的,你直接克隆就是了,点击分组上面那个对勾,就能看到克隆的选项。

1 楼第二张图你为什么不点开分组抽屉,而一定要在列表上点击呢?是有什么原因吗?

from searchjumper.

YandLiu avatar YandLiu commented on September 27, 2024

原来只是提示作用?我还以为直接就能点击了,囧……这样少一步更方便
另外我用空白配置测试了下,也装了Ignore X-Frame-Options,但是在Github和谷歌搜索页面上预览链接都不工作
Github上看网络传输日志是这样的
图片

谷歌上是这样的
图片

from searchjumper.

hoothin avatar hoothin commented on September 27, 2024

抱歉,因为安全原因,我自己不用绕过 cors 扩展,如果我上面给出的不生效,那就需要你自己去找一个了。

from searchjumper.

YandLiu avatar YandLiu commented on September 27, 2024

好的 非常感谢
装上个改CORS的扩展,谷歌搜索页面的链接预览是没有问题了,但是Github上的还是空白的,所以Github上这个应该是别的原因?

from searchjumper.

hoothin avatar hoothin commented on September 27, 2024

错误提示是啥?如果不是 cors 的问题,那么大概率是 github 自身的内容禁止在 iframe 中显示吧

from searchjumper.

YandLiu avatar YandLiu commented on September 27, 2024

似乎都跟CORS没关?
谷歌的好像只是网卡了……晕死
Github是在这个issue页面测试的,我已经启用了Ignore X-Frame-Options扩展的。看了下控制台,说是
Content-Security-Policy:由于违反了下列指令:“frame-src https://viewscreen.githubusercontent.com/ https://notebooks.githubusercontent.com/”,此页面位于 https://github.com/hoothin/SearchJumper 的资源(frame-src)无法加载 https://github.com/hoothin/SearchJumper/issues/138

我去AMO上搜了下CSP相关的扩展,看起来都不像是能解决这个问题的

其实我记得昨天白天Github上莫名其妙还正常的,今天空白配置都不行了,晕死

不知道为啥MaxFocus那个扩展就能在Github上一直正常预览

from searchjumper.

hoothin avatar hoothin commented on September 27, 2024

那你就重新找一个呀。
这个错误是响应头里的 Frame-Options 导致的,光删除 X-Frame-Options 肯定不够。
Max那个扩展我记得是用 declarativeNetRequestX-Frame-Options Frame-Options 甚至还有整个 Content-Security-Policy 全部删掉的,而且还改了 ALLOW-FROM。实在是太狠,反正我是不敢用。

from searchjumper.

hoothin avatar hoothin commented on September 27, 2024

你如果不在意安全的话,用 modheader 按我下面的图示写,和 max 效果是一样的。注意底下那个 url filter 要设定好。
image

不过这个已经偏题很远了。搜索酱也不是用来显示 iframe 的

from searchjumper.

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.