Skip to content

Commit

Permalink
Added lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
GodMod committed Jul 11, 2020
1 parent cb7f786 commit ccf111e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion discord_plugin_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function __shortcuts()
return array_merge(parent::$shortcuts, $shortcuts);
}

public $version = '1.2.3';
public $version = '1.2.4';
public $build = '';
public $copyright = 'GodMod';
public $vstatus = 'Stable';
Expand Down
4 changes: 2 additions & 2 deletions portal/discordpostviewer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function output() {

// output date as well as User and text
$useravatar = $row['avatar'];
if ($useravatar) $myOut .= '<div class="user-avatar-small user-avatar-border floatLeft"><img src="'.sanitize($useravatar).'" class="user-avatar small" /></div>';
if ($useravatar) $myOut .= '<div class="user-avatar-small user-avatar-border floatLeft"><img src="'.sanitize($useravatar).'" class="user-avatar small" loading="lazy"/></div>';
$myOut .= '<div class="dclp_date small dclp_text_margin">'.sanitize($row['username']).', '.sanitize($row['topic_title']).'; '. $this->time->createTimeTag(strtotime($row['posttime']), $this->time->user_date(strtotime($row['posttime']), true)).'</div>';
$myOut .= '<div class="dclp_text">'. $row['content'].'</div>';
$myOut .= '</div><div class="clear"></div>';
Expand Down Expand Up @@ -238,7 +238,7 @@ public function output() {

// output date as well as User and text
$useravatar = $row['avatar'];
if ($useravatar) $myOut .= '<div class="user-avatar-small user-avatar-border floatLeft"><img src="'.sanitize($useravatar).'" class="user-avatar small" /></div>';
if ($useravatar) $myOut .= '<div class="user-avatar-small user-avatar-border floatLeft"><img src="'.sanitize($useravatar).'" class="user-avatar small" loading="lazy"/></div>';
$myOut .= '<div class="dclp_date small dclp_text_margin">'.sanitize($row['username']).', '.sanitize($row['topic_title']).'<br />'. $this->time->createTimeTag(strtotime($row['posttime']), $this->time->user_date(strtotime($row['posttime']), true)).'</div>';
$myOut .= '<div class="dclp_text">'. $row['content'].'</div>';
$myOut .= '</div><div class="clear"></div>';
Expand Down

0 comments on commit ccf111e

Please sign in to comment.