1- import AdSense from 'components/adsense' ;
21import './style.scss' ;
2+ import AdSense from 'components/adsense' ;
33import alert from 'components/dialogs/alert' ;
44import confirm from 'components/dialogs/confirm' ;
55import prompt from 'components/dialogs/prompt' ;
66import select from 'components/dialogs/select' ;
7- import DotsLoading from 'components/dots' ;
87import Router from 'lib/Router' ;
98import { calcRating , capitalize , getLoggedInUser , hideLoading , showLoading } from 'lib/helpers' ;
109
@@ -29,10 +28,12 @@ export default function Plugins({ user, orderBy, status, name }) {
2928 const res = await fetch ( url ) ;
3029 const { isAdmin, id : userId } = ( await getLoggedInUser ( ) ) || { } ;
3130 const plugins = await res . json ( ) ;
31+ const adsPosition = [ 2 , 15 , 28 ] ;
3232
3333 el . setAttribute ( 'data-msg' , 'No plugins found. :(' ) ;
34- for ( const plugin of plugins ) {
35- if ( Math . random ( ) < 0.1 ) {
34+ for ( let i = 0 ; i < plugins . length ; i ++ ) {
35+ const plugin = plugins [ i ] ;
36+ if ( adsPosition . includes ( i ) || ( i > 33 && Math . random ( ) < 0.1 ) ) {
3637 el . append ( < AdSense className = 'plugin' style = { { position : 'relative' } } /> ) ;
3738 }
3839 el . append ( < Plugin { ...plugin } isAdmin = { isAdmin } userId = { userId } /> ) ;
@@ -86,7 +87,7 @@ function Plugin({
8687 ) }
8788 </ div >
8889 < p >
89- { id } • { ' ' }
90+ { id } •
9091 < small >
9192 < strong > { version } </ strong >
9293 </ small >
0 commit comments