-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2902 from codeigniter4/carbonads
Carbonads
- Loading branch information
Showing
3 changed files
with
111 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Add Carbon Ads underneath navigation to support CodeIgniter Foundation | ||
*/ | ||
if (window.location.hostname === 'codeigniter.com') { | ||
window.onload = function () { | ||
// Create a HTML DOM Element Object | ||
var carbon = document.createElement('script'); | ||
carbon.async = true; | ||
carbon.type = 'text/javascript'; | ||
carbon.src = 'https://cdn.carbonads.com/carbon.js?serve=CE7I62QW&placement=codeignitercom'; | ||
carbon.id = '_carbonads_js'; | ||
|
||
// Append Carbon Ads to .wy-menu | ||
document.querySelector('.wy-menu').appendChild(carbon); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters