Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

chrome block javascript alert

// ==UserScript==
// @name        Wordswithfriends, Block javascript alerts
// @match       http://wordswithfriends.net/*
// @run-at      document-start
// ==/UserScript==

addJS_Node (null, null, overrideSelectNativeJS_Functions);

function overrideSelectNativeJS_Functions () {
    window.alert = function alert (message) {
        console.log (message);
    }
}

function addJS_Node (text, s_URL, funcToRun) {
    var D                                   = document;
    var scriptNode                          = D.createElement ('script');
    scriptNode.type                         = "text/javascript";
    if (text)       scriptNode.textContent  = text;
    if (s_URL)      scriptNode.src          = s_URL;
    if (funcToRun)  scriptNode.textContent  = '(' + funcToRun.toString() + ')()';

    var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
    targ.appendChild (scriptNode);
}
Comment

chrome block javascript alert

function addJS_Node (text, s_URL, funcToRun) {
    var D                                   = document;
    var scriptNode                          = D.createElement ('script');
    scriptNode.type                         = "text/javascript";
    if (text)       scriptNode.textContent  = text;
    if (s_URL)      scriptNode.src          = s_URL;
    if (funcToRun)  scriptNode.textContent  = '(' + funcToRun.toString() + ')()';

    var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
    targ.appendChild (scriptNode);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: route not getting refresh with different id in angular 
Javascript :: date format in moment js 
Javascript :: import an image react in the public folder 
Javascript :: accessing nested objects in javascript 
Javascript :: tables javascript 
Javascript :: round to 2 decimal places 
Javascript :: dot geometru three js 
Javascript :: how make calender in bootstrap 
Javascript :: adding debounce in autocomplete material ui 
Javascript :: get text in protractor 
Javascript :: how to connect react to backend 
Javascript :: includes in js 
Javascript :: react native diasble view 
Javascript :: ejs render 
Javascript :: jquery datatable update row cell value 
Javascript :: Get specific elements from an object by using filter method 
Javascript :: how to use findoneandupdate 
Javascript :: if or react 
Javascript :: google autocomplete not returning lat long 
Javascript :: spinner react native 
Javascript :: jQuery DataTables Checkboxes 
Javascript :: jquery get value of element 
Javascript :: discord.js set role permissions for all channels 
Javascript :: vue google map api for user marker location 
Javascript :: where is select value in javascript event object 
Javascript :: remove from string javascript regex 
Javascript :: show modal by using id in list react 
Javascript :: socket emit to 
Javascript :: how to add icons in angular 
Javascript :: event after div created 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =