Recenzii pentru Header Editor
Header Editor de 泷涯, 道滿
169 de recenzii
- Evaluat(ă) cu 5 din 5 stelede Utilizator Firefox 12667696, 6 ani în urmă添加规则太繁琐了
能增加模板功能,或者给编辑增加个另存一条新规则吗 - Evaluat(ă) cu 5 din 5 stelede Сергей, 6 ani în urmă
- Evaluat(ă) cu 5 din 5 stelede ZQ, 6 ani în urmă
- Evaluat(ă) cu 4 din 5 stelede SkySkimmer, 6 ani în următhuerrsch said
>Here I set up a single, simple rule to "Modify the response header", match type "All", execute type "normal", to always set the "Content-Disposition" header type to a value of "inline". That's it, two minutes to set up the whole thing, and it works beautifully!
This is also what I wanted to use this extension for, but this simple solution will remove the filename information which may be passed in that header. Instead I used the following custom function which mostly works. Note that the "tobytes" call is necessary otherwise on unicode strings firefox complains about too-high charcodes.
function tobytes (str) {
let res = "";
for (let i = 0; i < str.length; ++i) {
let code = str.charCodeAt(i);
if (code > 255) {
res += encodeURI(str[i]);
}
else {
res += str[i];
}
}
return res;
}
for (let a in val) {
if (val[a].name.toLowerCase() === 'content-disposition') {
let orig = val[a].val
console.log("orig: " + val[a].value);
let res = val[a].value.replace(/^attachment/iu, "inline");
res = tobytes(res);
console.log("res: " + res);
val[a].value = res;
}
} - Evaluat(ă) cu 5 din 5 stelede Utilizator Firefox 12456873, 6 ani în urmăGreat extension !
Would it be possible to introduce a whitelist/blacklist, where you can specify on which sites should the specific rules apply, this would be also better performance wise.
Also, can you add more regex rules/matching in your wiki, for example if we want to emulate above functionality using regex:
Example rule:
- Cancel all .gif file requests to domains example.com, example1.com, example2.com
Is this the correct way to handle it, or is there a better rule/option/function in the extension ?
^http(s?)://(.*)\.example.com|example1.com|example2.com/(.*gif)
Thanks,
Kind regards - Evaluat(ă) cu 4 din 5 stelede Pablo Blanco Celdrán, 6 ani în urmăSolved my problem of being unable to open a site that needed specific headers for testing.
But I have an issue: Routes are nor being matched, but the test result successful, so the header is applied everywhere. - Evaluat(ă) cu 5 din 5 stelede scriptkitz, 7 ani în urmă我新建规则,点击保存,无反应,没办法保存了。。看控制台报错是:
let dbOpenRequest = window.indexedDB.open("headereditor", 2);
一直调用的是
dbOpenRequest.onerrorRăspunsul dezvoltatorului
postat la 7 ani în urmă这个问题其实我也遇到过,调试过之后发现没办法解决,你可以尝试一下这篇短文里面的内容,但我不保证能够解决:https://github.com/FirefoxBar/xStyle/wiki/DB-Error - Evaluat(ă) cu 5 din 5 stelede Utilizator Firefox 13492739, 7 ani în urmă
- Evaluat(ă) cu 5 din 5 stelede thuerrsch, 7 ani în urmăThis extension may look a bit frightening at first, but with some basic knowledge of http headers (and, luckily for me, no Chinese at all) it's really easy to do simple things.
The problem that Header Editor helped me to solve is as ancient as the hills: it's that infamous bug about how Firefox handles Content-Disposition: attachment headers (https://bugzilla.mozilla.org/show_bug.cgi?id=453455). A legacy extension needed replacing with Firefox Quantum. I tried a few specialized WebExtensions with little success (sometimes they worked, sometime they didn't), then I stumbled upon Header Editor.
Here I set up a single, simple rule to "Modify the response header", match type "All", execute type "normal", to always set the "Content-Disposition" header type to a value of "inline". That's it, two minutes to set up the whole thing, and it works beautifully!
Of course Header Editor can do much more complex things. With its support for custom JavaScripting it certainly has the potential to replace a whole bunch of smaller-scale extensions for all kinds of stuff related to http headers. In the right hands it can become a very powerful tool with endless possibilities. I guess that's about the best thing one can say about any piece of software. - Evaluat(ă) cu 5 din 5 stelede Utilizator Firefox 13391169, 7 ani în urmă
- Evaluat(ă) cu 5 din 5 stelede FateRover, 7 ani în urmă这样就能快速开启/关闭 规则中某条规则而不必开启设置页面
ps:楼下那个是个喷子,在Referer Control和HE上无脑喷,上来就给1星 - Evaluat(ă) cu 5 din 5 stelede 喵拉布丁, 7 ani în urmă可以替代mason了。
不过希望能在图片右键菜单上增加反防盗链的快捷菜单,点击后打开设置页面弹出添加规则对话框,并自动填写好反防盗链的必要选项(规则类型、匹配类型、图片域名或域名的正则表达式、头名称等),类似mason那样的。
不然每次添加反防盗链的规则都要修改各种选项,有点麻烦。
非常感谢!Răspunsul dezvoltatorului
postat la 7 ani în urmă收到,下个版本增加。
PS:有建议请尽量到GitHub提交,AMO这边我不一定每天都看,而且持续追踪不方便 - Evaluat(ă) cu 5 din 5 stelede 玄清介, 7 ani în urmă替代了Redirector和Referer Control, 基本替代了Feiruonet脚本的3大功能
能不能考虑把配置存在browser-extension-data下呢? - Evaluat(ă) cu 4 din 5 stelede Kawzen, 7 ani în urmăI first thought it won't be english so I avoided it for a while
working as it should
it can remove and modify headers
for redirect reqs I use Redirector (Wildcard is simple * $1 $2 ...)
but realy u need to update the icon :$
Edit:
Thanks for the fast reply &amp; solution, I was able to replace my rules
IconArchive dotcom is a good place :D
I moved the button from the toolbar to the menu to appear in a bigger size and it's much better now :)Răspunsul dezvoltatorului
postat la 7 ani în urmăI am developing a web page which can convert Redirector rules to this extension.
Wildcard can be replaced by "(.*?)" in regexp.
This icon is draw by me but maybe I have no art cell. If you have a better icon, you can send it to me at GitHub by submit a issue or a pull request.
Edit:
Thank you for your recommendation. I will try to find a better icon there.