adsence追加

This commit is contained in:
Your Name 2018-10-26 22:43:12 +09:00
parent 8d1f4072ee
commit d2a1d7c8cb
3 changed files with 39 additions and 0 deletions

31
adsence/adsence.php Normal file
View File

@ -0,0 +1,31 @@
<?php
/**
* Name: adsence
* Description: Show Ads in Harukin+
* Version: 1.0
* Depends: harukin
* Author: harukin <harukin@haruk.in>
*/
use Zotlabs\Extend\Hook;
function upgrade_info_load(){
Hook::register('conversation_start', 'addon/adsence/adsence.php', 'adsence');
}
function upgrade_info_unload(){
Hook::register('conversation_start', 'addon/adsence/adsence.php', 'adsence');
}
function adsence(&$b){
$b .= "
<script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client:'ca-pub-7579303910483862',
enable_page_level_ads: true
});
</script>";
}

8
testaddon/testaddon.php Normal file
View File

@ -0,0 +1,8 @@
<?php
/**
* Name: testaddon
* Description: testtestaddon
* Version: 1.0
* Depends: Core
* Author: harukin <harukin@plus.haruk.in>
*/

View File