Shqyrtime për Header Editor
Header Editor nga 泷涯, 道滿
Shqyrtim nga SkySkimmer
Vlerësuar me 4 yje nga 5 të mundshëm
nga SkySkimmer, 8 vite më parë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;
}
}
>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;
}
}
181 shqyrtime
- Vlerësuar me 5 yje nga 5 të mundshëmnga 肉肉, 2 muaj më parë
- Vlerësuar me 4 yje nga 5 të mundshëmnga 张武杰, 2 muaj më parë1、此附加组件的效果达到预期
2、插件有用
3、修改cookie使用不方便,别的还可以
4、未找到代替的插件前会使用 - Vlerësuar me 5 yje nga 5 të mundshëmnga 14492264 përdoruesi Firefox-i, 3 muaj më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga 16874451 përdoruesi Firefox-i, 3 muaj më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga Poligraf Poligrafovich Bouboulov, 5 muaj më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga Tempdirz, 8 muaj më parë
- Vlerësuar me 1 yje nga 5 të mundshëmnga Naz, 10 muaj më parëYou have 1 job - add a header. Why are you substituting my header to lowercase without me wanting to do so?
- Vlerësuar me 5 yje nga 5 të mundshëmnga 墨水, 10 muaj më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga mijni, një vit më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga Remains, një vit më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga 38咿, një vit më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga lundbelt, një vit më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga 野锡侧, një vit më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga 17968901 përdoruesi Firefox-i, një vit më parë
- Vlerësuar me 4 yje nga 5 të mundshëmnga Luis, 2 vite më parëPlease add support for newer versions of Firefox
- Vlerësuar me 5 yje nga 5 të mundshëmnga tyt199, 2 vite më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga Jessica45Jim, 2 vite më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga Jesse, 2 vite më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga Footmen, 2 vite më parëIt's great but please update a new version and enable Android support, it's completely compatible with Android.
- Vlerësuar me 5 yje nga 5 të mundshëmnga 18084131 përdoruesi Firefox-i, 2 vite më parë
- Vlerësuar me 5 yje nga 5 të mundshëmnga 18032280 përdoruesi Firefox-i, 2 vite më parë