NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name null // @namespace http://crimenetwork.su/ // @version 0.9 // @description Simple method to alert a user when visiting an external site // @author null // @match https://crimenetwork.su/* // @grant none // ==/UserScript== (function() { 'use strict'; jQuery('.prettyprint, .entry-content p a').each(function() { if(jQuery(this).find('a').length == 0 && ! jQuery(this).attr('href')) {return;} var href = null; if(jQuery(this).attr('href')) { href = jQuery(this).attr('href'); } else { href = jQuery(this).find('a').attr('href'); } var $link = jQuery('<a href="' + href +'">' + href + '</a>'); jQuery(this).replaceWith( $link); if(href.indexOf('https://crimenetwork.su/') !== 0) { $link.on('click', function(e) { externalWarning(href); return false; }); } }); function externalWarning(href) { var $warning = jQuery( '<div style="top: 0; left: 0; position: fixed; width: 100%; height: 100%; background: rgba(0,0,0,0.75); z-index: 100000">' + '<div style="background: #121212; width: 450px; margin: auto; padding: 20px; margin-top: 75px;border: 1px solid rgba(255,255,255,0.2); border-radius: 3px;">' + '<h3 style="font-size: 16px; font-weight: bold; color: #FF0000; margin-bottom: 20px">Du verlässt crimenetwork.su</h3>' + '<p style="margin-bottom: 12px;">Der von dir angeklickte Link ist unter Umständen eine Phishingseite.<br/><strong style="color: #d84949">Es wird wommöglich versucht deine Anmeldedaten für das Forum zu stehlen!</strong></p>' + '<input style="display: block; width: 100%; padding: 5px; box-sizing: border-box; margin-bottom: 12px;" value="' + href + '" readonly/ > ' + '<div style="text-align: right">' + '<a href="#" style="display: inline-block; padding: 7px 12px;">Abbrechen</a><a target="_blank" href="' + href + '" style="display: inline-block; padding: 7px 12px;">Seite trotzdem besuchen</a>' + '</div>' + '</div>' + '<div>'); jQuery('body').append($warning); $warning.find('a').on('click', function() {$warning.remove(); return false;}); } })();