The Un-Official Proxomitron Forum
Source code modification (Модификация исходного кода) - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Forum Related (/forumdisplay.php?fid=37)
+--- Forum: Privoxy (/forumdisplay.php?fid=49)
+--- Thread: Source code modification (Модификация исходного кода) (/showthread.php?tid=2317)



Source code modification (Модификация исходного кода) - vlad_s - Aug. 29, 2017 05:15 PM

Hello! I need to change the source code to https://www.gazeta.ru. As an example, I delete the code fragment in line 49:
Code:
s@X-UA-Compatible@@ig
The problem is that it does not work, it works only in IE11. In Firefox and Edge does not work. The problem is similar in these browsers, somehow they execute the original code.

Привет! Нужно изменить исходный код https://www.gazeta.ru. В качестве примера, удаляю фрагмент кода в 49 строке:
Code:
s@X-UA-Compatible@@ig
Проблема в том что это не срабатывает, вернее работает только в IE11. В Firefox и Edge не работает.
Проблема похоже в этих браузерах, каким-то образом они выполняют оригинальный код.


RE: Source code modification (Модификация исходного кода) - vlad_s - Aug. 30, 2017 09:38 PM

Another example, the replacement of the word Mail on SMail on page ok.ru
Code:
s@Mail@SMail@g
In IE11 always works, but in the MS Edge and Firefox 54 are not always, especially if you perform the input, after which several times press Ctrl+R. What can be wrong?

Ещё пример, замена слова Mail на SMail на странице ok.ru
Code:
s@Mail@SMail@g
В ИЕ11 всегда работает, а вот в MS Edge и Firefox 54 не всегда, особенно если выполнить вход, после чего несколько раз нажать Ctrl+R. В чем может быть дело?
[Image: uL71rq1PGU.png]


RE: Source code modification (Модификация исходного кода) - Faxopita - Aug. 31, 2017 09:35 PM

Maybe you could try
Code:
s@Mail@SMail@USgi

With…
  • U: switches to ungreedy matching
  • s: the match may span multiple lines in the page.

If still not working, I suggest you look into the page source code and compare the two different versions from IE and MS Edge.

Or maybe the `@` sign does not work very well and should be replaced by something like `|`.


RE: Source code modification (Модификация исходного кода) - vlad_s - Sep. 01, 2017 02:46 PM

The option you proposed did not change anything either (and with other delimiters too). In IE11 works, in Edge does not work. I looked at the source code in IE11, it changes. Also on the main page of http://www.gazeta.ru from the message above. Could it be that the browser somehow executes the code already in itself?
On ok.ru sometimes works, if several times press Ctrl+R, then everything repeats. But gazeta.ru never works, works correctly only in IE11.
I recorded the video so as not to make the impression that it was some kind of joke: http://my-files.ru/ny2wqi/Video_2017-09-01_181125.wmv

Предложенный вами вариант так же ничего не изменил (и с другими разделителями тоже). В IE11 работает, в Edge не работает. Исходний код в IE11 я смотрел, он меняется. Так же на главной странице http://www.gazeta.ru из сообщения выше. Может ли быть так что браузер как-то исполняет код уже у себя?
На оk.ru иногда срабатывает, если несколько раз нажимать Ctrl+R, потом всё повторяется. Но на gazeta.ru никогда не срабатывает, правильно работает только в ИЕ11.
Я записал видео, чтобы не создалось впечатления что это какая-то шутка: http://my-files.ru/ny2wqi/Video_2017-09-01_181125.wmv

[Image: 71ux3P1YUM_thumb.jpg]


RE: Source code modification (Модификация исходного кода) - vlad_s - Sep. 01, 2017 04:38 PM

I saved the page ok.ru with
Code:
curl -k -o ok https://ok.ru
to a file. In Notepad ++ opened this file, it is changed Privoxy. Edge and FF somehow ignore the actions of Privoxy???

Я сохранил страницу ok.ru при помощи
Code:
curl -k -o ok https://ok.ru
в файл. В Notepad++ открыл этот файл, он изменён Privoxy. Edge и FF как-то игнорируют действия Privoxy???


RE: Source code modification (Модификация исходного кода) - vlad_s - Sep. 01, 2017 06:24 PM

It seems I figured out what was the matter. Enabling the filter "+prevent-compression" for the specified pages solved the problem Smile!.

Кажется я разобрался в чём было дело. Включение фильтра "+prevent-compression" для указаных страниц решило проблему Smile!.


RE: Source code modification (Модификация исходного кода) - Faxopita - Sep. 01, 2017 08:44 PM

Congratulations! I wouldn't have thought about enabling that filter.


RE: Source code modification (Модификация исходного кода) - vlad_s - Sep. 01, 2017 09:42 PM

I also accidentally noticed.

Я тоже случайно обратил внимание.