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);
});
While I think that there are no "100% good guys" in this world (no country is), I do think that there are "less bad guys" or "preferred bad guys". From my personal POV, of course, I'd say that I prefer to side with Israel, the US and the Western world before siding with Iran, Hezbollah, Hamas, Russia, China and North Korea.
The "Western world" team has always been better regarding economics, freedoms and human rights than the "non-Western world" team. Israeli people have a degree of prosperity and freedom that Iranian, Russian and North Korean people could only dream about, that's a fact. The same applies to the "Western world" as a whole. Just look at the quality of life of the inhabitants of the "non-Western" world: it's measurably worst by any metric.
So that's why I choose to side with the West, every time. Results speak for themselves. Even if the West isn't perfect and 100% "good", either.
*lose
Anyway, had a feeling this was going to happen eventually which is why I started using NextDNS. The ad blocking on that is amazing (especially on android). It will be interesting to see how it works paired with ublock origin lite as I know the regular ublock origin extension removes a lot of ad placeholders
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