Skip to content

Commit 4cc69d0

Browse files
author
GodMod
committed
Added/removed lazy loading
1 parent 01b9e76 commit 4cc69d0

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

core/embedly.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public function embedTwitch($url){
425425

426426
if (!empty($src)) {
427427
$parent = parse_url($this->env->buildlink());
428-
$iframe = '<iframe src="' . $src . '&parent=' . $parent['host'] . '&autoplay=false" height="500" width="850" allowfullscreen></iframe>';
428+
$iframe = '<iframe src="' . $src . '&parent=' . $parent['host'] . '&autoplay=false" height="500" width="850" allowfullscreen loading="lazy"></iframe>';
429429

430430
return (object)array('html' => $iframe, 'width'=> 850, 'height'=> 500, 'type'=>'video', 'provider_url' => 'https://twitch.tv', 'provider_name' => 'Twitch');
431431
}

core/game.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ private function decorate_classes($class_id, $profile=array(), $size=16, $pathon
165165

166166
if(is_file($strIconPathPrefix.'.svg')){
167167
$icon_path = $strIconServerPathPrefix.'.svg';
168-
return ($pathonly) ? $icon_path : '<img src="'.$icon_path.'" alt="class '.$class_id.'" class="'.$this->game.'_classicon classicon gameicon'.'" title="'.$this->get_name('classes', $class_id).'" loading="lazy"/>';
168+
return ($pathonly) ? $icon_path : '<img src="'.$icon_path.'" alt="class '.$class_id.'" class="'.$this->game.'_classicon classicon gameicon'.'" title="'.$this->get_name('classes', $class_id).'"/>';
169169
}elseif(is_file($strIconPathPrefix.'.png')){
170170
$icon_path = $strIconServerPathPrefix.'.png';
171-
return ($pathonly) ? $icon_path : '<img src="'.$icon_path.'" alt="class '.$class_id.'" class="'.$this->game.'_classicon classicon gameicon'.'" title="'.$this->get_name('classes', $class_id).'" loading="lazy"/>';
171+
return ($pathonly) ? $icon_path : '<img src="'.$icon_path.'" alt="class '.$class_id.'" class="'.$this->game.'_classicon classicon gameicon'.'" title="'.$this->get_name('classes', $class_id).'"/>';
172172
}
173173

174174
return false;
@@ -198,7 +198,7 @@ private function decorate_races($race_id, $profile=array(), $size=16, $pathonly=
198198
}
199199

200200
if($icon_path){
201-
return ($pathonly) ? $icon_path : "<img src='".$icon_path."' height='".$size."' alt='race ".$race_id."' class=\"".$this->game."_raceicon raceicon\" title=\"".$this->get_name('races', $race_id)."\" loading=\"lazy\"/>";
201+
return ($pathonly) ? $icon_path : "<img src='".$icon_path."' height='".$size."' alt='race ".$race_id."' class=\"".$this->game."_raceicon raceicon\" title=\"".$this->get_name('races', $race_id)."\"/>";
202202
}
203203
return false;
204204
}

core/socialplugins.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private function facebook_share($urlToShare, $text, $height){
151151
}
152152

153153
private function facebook_like($urlToShare, $text, $height){
154-
$html = '<iframe src="https://www.facebook.com/plugins/like.php?href='.rawurlencode($urlToShare).'&amp;layout=button_count&amp;show_faces=false&amp;width=110&amp;action=like&amp;font&amp;colorscheme=light&amp;height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:'.$height.'px;" class="absmiddle"></iframe>';
154+
$html = '<iframe src="https://www.facebook.com/plugins/like.php?href='.rawurlencode($urlToShare).'&amp;layout=button_count&amp;show_faces=false&amp;width=110&amp;action=like&amp;font&amp;colorscheme=light&amp;height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:'.$height.'px;" class="absmiddle" loading="lazy"></iframe>';
155155
return $html;
156156
}
157157

0 commit comments

Comments
 (0)