MishNSK
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору //Открыть в uTorrent........................ (() => { const id = _id + "-" + Components.stack.lineNumber; if (Application.storage.get(id, null)) return; Application.storage.set(id, {}); addDestructor(() => Application.storage.set(id, null)); const topic = "http-on-examine-response"; const cd = "Content-Disposition"; var re = /^\s*attachment/i; function onResponse(channel) { try { channel.QueryInterface(Ci.nsIHttpChannel); var disp = channel.getResponseHeader(cd); channel.loadFlags & channel.LOAD_DOCUMENT_URI //&& channel.contentType == "application/x-bittorrent" && ( channel.contentType == "application/x-bittorrent" || channel.URI.path.startsWith("/parse/d.rutor.org/download") ) && re.test(disp) && channel.setResponseHeader(cd, disp.replace(re, "inline"), false); } catch(ex) {} } Services.obs.addObserver(onResponse, topic, false); addDestructor(() => Services.obs.removeObserver(onResponse, topic)); })(); | Всего записей: 768 | Зарегистр. 08-10-2012 | Отправлено: 14:52 08-09-2015 | Исправлено: MishNSK, 14:56 08-09-2015 |
|