Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kakpishem.ru #25353

Closed
XX-J opened this issue Nov 14, 2018 · 5 comments
Closed

kakpishem.ru #25353

XX-J opened this issue Nov 14, 2018 · 5 comments
Labels
A: By Design The issue cannot be resolved due to technical, ethic, or legal reasons A: Resolved P4: Low

Comments

@XX-J
Copy link

XX-J commented Nov 14, 2018

https://kakpishem.ru/pishem-pravilno-slova/kiril-ili-kirill-kak-pishetsya.html

1. Скриптовая защита от "мышиной возни" (копирования) на странице:

<script type="text/javascript">
    /*<![CDATA[*/
    document.oncontextmenu = function() {
        return false;
    };
    document.onselectstart = function() {
        if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
            return false;
        } else {
            return true;
        }
    };
    if (window.sidebar) {
        document.onmousedown = function(e) {
            var obj = e.target;
            if (obj.tagName.toUpperCase() == 'SELECT' || obj.tagName.toUpperCase() == "INPUT" || obj.tagName.toUpperCase() == "TEXTAREA" || obj.tagName.toUpperCase() == "PASSWORD") {
                return true;
            } else {
                return false;
            }
        };
    }
    document.ondragstart = function() {
        return false;
    };
    /*]]>*/
</script>

2. Добавление к копируемому тексту ссылки на страницу-источник. С помощью скрипта на странице:

<script>
    document.oncopy = function() {
        var bodyElement = document.body;
        var selection = getSelection();
        var link_url = document.URL;
        var page_link = "<br>Источник: %link%";
        page_link = page_link.replace("%link%", " " + link_url + " ");
        var copy_text = selection + page_link;
        var divElement = document.createElement("div");
        divElement.style.position = "absolute";
        divElement.style.left = "-99999px";
        bodyElement.appendChild(divElement);
        divElement.innerHTML = copy_text;
        selection.selectAllChildren(divElement);
        window.setTimeout(function() {
            bodyElement.removeChild(divElement);
        },
        0);
    }
</script>

Mozilla Firefox v53.0.3 (Win7SP1) - Adguard v2.10.13
Английский фильтр | Русский фильтр | Фильтр раздражителей
Фильтр виджетов социальных сетей | Фильтр счетчиков и системы аналитики

@XX-J XX-J mentioned this issue Mar 2, 2019
@slavaleleka slavaleleka added A: By Design The issue cannot be resolved due to technical, ethic, or legal reasons A: Won't fix labels Jun 17, 2019
@XX-J
Copy link
Author

XX-J commented Jun 20, 2019

"By Design" - в данном случае дизайн не человеческий, поэтому прошу добавить:
kakpishem.ru#%#//scriptlet("abort-current-inline-script", "document.oncontextmenu")
kakpishem.ru#%#//scriptlet("abort-current-inline-script", "document.oncopy")

@slavaleleka
Copy link
Contributor

мы блокируем рекламу, потому что она навязчивая и рассеивает внимание пользователей, а не потому что она "не человеческая". мы не занимаемся тем, о чем вы просите выше. можете применять какие-угодно правила из пользовательского фильтра, можете сделать свой собственный кастомный фильтр, но такого рода правила не могут быть добавлены в фильтры Адгарда

Alex-302 added a commit that referenced this issue Jun 20, 2019
@Alex-302
Copy link
Member

Добавляем, если решение не отнимает время, т.к. это вторично.
Правила добавил в раздражители.

@XX-J
Copy link
Author

XX-J commented May 13, 2020

У них там новый скрипт завёлся, не позволяющий выделять:

<script>function disableSelection(target){if (typeof target.onselectstart!="undefined") target.onselectstart=function(){return false};else if (typeof target.style.MozUserSelect!="undefined")target.style.MozUserSelect="none";else target.onmousedown=function(){return false};target.style.cursor = "default"}disableSelection(document.body);</script>

Поэтому добавьте, пожалуйста, в раздражители:

kakpishem.ru#%#//scriptlet("abort-current-inline-script", "disableSelection")

https://kakpishem.ru/pishem-pravilno-slova/dlinna-ili-dlina-kak-pishetsya.html

@Alex-302
Copy link
Member

Ок.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: By Design The issue cannot be resolved due to technical, ethic, or legal reasons A: Resolved P4: Low
Projects
None yet
Development

No branches or pull requests

3 participants