I'm creating a toolbar for my soon coming redesigned site Illing Spree and I want to make sure only the sites listed in the array "ill_members" will only load the bar, that way there's such things as an authorization. But I'm not exactly sure how to make these if statements. Can anyone help? :)
Also: This is all being written inside a JavaScript file, hence making a bootstrap so the other sites wouldn't go through the trouble of installing or working with upgrades.
var jQueryScriptOutputted=false;function initJQuery(){if(typeof jQuery=="undefined"){if(!jQueryScriptOutputted){jQueryScriptOutputted=true;document.write("<scr"+"ipt type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></scr"+"ipt>")}}else $(function(){})}initJQuery();
var ill_members = [
{name: "Illing Spree", link: "illingspree.com"},
{name: "WeAreRap.com", link: "wearerap.com"},
{name: "Gossip On Time", link: "gossipontime.com"}
];
var ill_music_members = [
{name: "WeAreRap.com", link: "wearerap.com"},
];
var dyno = "http://dyno.illingspree.com/toolbar/v0.1/";
var illBar = "<div id='illbar'><a id='illbar-logo' href='http://illingspree.com'></a></div>";
$(document).ready(function () {
$('head').append("<link rel='stylesheet' type='text/css' href='" + dyno + "tb.css'/>");
$('body').append(illBar);
});
Does anyone know how the Ghostery extension works in Google Chrome? I switched to that quite a while ago, from uBlock Origin after uBlock started having issues just working. Personally I love Ghostery and I think it does a fantastic job, and I really enjoy the whitelist I have built up as well for tons of websites that don't serve ads so that it isn't blocking good elements of them by accident.
>pointed to a British firm called SafeToNet
There it is. Some UK MP's brother/friend/spouse owns this shitware company and wants those kickbacks right into their own pocket.
DNS based blocking only works as long as the ads are served from hosts than the content. Closing that loophole would be pretty easy. I'd say it sits in a sweet spot of being just nerdy enough that the average person doesn't set it up, meaning it isn't really on the big companies' radars.
Question
Mr.XXIV
I'm creating a toolbar for my soon coming redesigned site Illing Spree and I want to make sure only the sites listed in the array "ill_members" will only load the bar, that way there's such things as an authorization. But I'm not exactly sure how to make these if statements. Can anyone help? :)
Also: This is all being written inside a JavaScript file, hence making a bootstrap so the other sites wouldn't go through the trouble of installing or working with upgrades.
var jQueryScriptOutputted=false;function initJQuery(){if(typeof jQuery=="undefined"){if(!jQueryScriptOutputted){jQueryScriptOutputted=true;document.write("<scr"+"ipt type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></scr"+"ipt>")}}else $(function(){})}initJQuery(); var ill_members = [ {name: "Illing Spree", link: "illingspree.com"}, {name: "WeAreRap.com", link: "wearerap.com"}, {name: "Gossip On Time", link: "gossipontime.com"} ]; var ill_music_members = [ {name: "WeAreRap.com", link: "wearerap.com"}, ]; var dyno = "http://dyno.illingspree.com/toolbar/v0.1/"; var illBar = "<div id='illbar'><a id='illbar-logo' href='http://illingspree.com'></a></div>"; $(document).ready(function () { $('head').append("<link rel='stylesheet' type='text/css' href='" + dyno + "tb.css'/>"); $('body').append(illBar); });Link to comment
https://www.neowin.net/forum/topic/1110673-javascript-array-match/Share on other sites
6 answers to this question
Recommended Posts