Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

fix noheader option in embed widgets #2795

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface IService {
anonymize_enabled : boolean;
// the place for instance specific customizations
// remember to parse (e.g. booleans) where they are used
custom : {[key : string]: string};
custom : {[key : string]: any};
site_name : string;
netiquette_url : string;
cachebust : boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ export class Service {
var directiveName = this.provider.normalizeDirective(widget);
var contextName = this.provider.normalizeContext(widget);

this.adhConfig.custom["hide_header"] = this.adhConfig.custom["hide_header"] || search.hasOwnProperty("noheader");
var noheader = search["noheader"] === "true" ? true : false;
this.adhConfig.custom["hide_header"] = this.adhConfig.custom["hide_header"] || noheader;

if (this.provider.hasDirective(directiveName)) {
this.widget = directiveName;
Expand Down