From 0d1ab95aa33871d6059b4b78354bb112dbd658b4 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Wed, 4 Nov 2015 15:23:04 -0800 Subject: [PATCH 1/3] takeout --- pub/tree/src/js/components/BodyComponent.coffee | 4 ++-- pub/tree/src/js/main.js | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pub/tree/src/js/components/BodyComponent.coffee b/pub/tree/src/js/components/BodyComponent.coffee index 1f98b18858..2f46f3e6bf 100644 --- a/pub/tree/src/js/components/BodyComponent.coffee +++ b/pub/tree/src/js/components/BodyComponent.coffee @@ -57,8 +57,8 @@ module.exports = query { render: -> className = (@props.meta.layout?.replace /,/g," ") || "" body = [reactify @props.body] - if document.location.hostname is 'urbit.org' - body.unshift (Spam {}, "") + # if document.location.hostname is 'urbit.org' + # body.unshift (Spam {}, "") if @props.meta.logo? body.unshift (Logo color:@props.meta.logo) if @props.meta.next? diff --git a/pub/tree/src/js/main.js b/pub/tree/src/js/main.js index 4fbcd7fe32..a2b877baad 100644 --- a/pub/tree/src/js/main.js +++ b/pub/tree/src/js/main.js @@ -519,9 +519,6 @@ module.exports = query({ var body, className, ref1; className = ((ref1 = this.props.meta.layout) != null ? ref1.replace(/,/g, " ") : void 0) || ""; body = [reactify(this.props.body)]; - if (document.location.hostname === 'urbit.org') { - body.unshift(Spam({}, "")); - } if (this.props.meta.logo != null) { body.unshift(Logo({ color: this.props.meta.logo From 73b35829b089c8351809465b5be7f570ac2b4515 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Wed, 4 Nov 2015 15:25:02 -0800 Subject: [PATCH 2/3] good spam --- pub/docs/dev/hoon/tutorial/0-nouns.mdy | 1 + pub/tree/src/js/components/BodyComponent.coffee | 4 ++-- pub/tree/src/js/main.js | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pub/docs/dev/hoon/tutorial/0-nouns.mdy b/pub/docs/dev/hoon/tutorial/0-nouns.mdy index a6ca503647..2523ca4e6f 100644 --- a/pub/docs/dev/hoon/tutorial/0-nouns.mdy +++ b/pub/docs/dev/hoon/tutorial/0-nouns.mdy @@ -1,6 +1,7 @@ --- title: Hoon 101.0: nouns, spans, and molds sort: 0 +spam: true next: true --- diff --git a/pub/tree/src/js/components/BodyComponent.coffee b/pub/tree/src/js/components/BodyComponent.coffee index 2f46f3e6bf..a59b3417c3 100644 --- a/pub/tree/src/js/components/BodyComponent.coffee +++ b/pub/tree/src/js/components/BodyComponent.coffee @@ -57,8 +57,8 @@ module.exports = query { render: -> className = (@props.meta.layout?.replace /,/g," ") || "" body = [reactify @props.body] - # if document.location.hostname is 'urbit.org' - # body.unshift (Spam {}, "") + if document.location.hostname is 'urbit.org' and @props.meta.spam + body.unshift (Spam {}, "") if @props.meta.logo? body.unshift (Logo color:@props.meta.logo) if @props.meta.next? diff --git a/pub/tree/src/js/main.js b/pub/tree/src/js/main.js index a2b877baad..2131a8485e 100644 --- a/pub/tree/src/js/main.js +++ b/pub/tree/src/js/main.js @@ -519,6 +519,9 @@ module.exports = query({ var body, className, ref1; className = ((ref1 = this.props.meta.layout) != null ? ref1.replace(/,/g, " ") : void 0) || ""; body = [reactify(this.props.body)]; + if (document.location.hostname === 'urbit.org' && this.props.meta.spam) { + body.unshift(Spam({}, "")); + } if (this.props.meta.logo != null) { body.unshift(Logo({ color: this.props.meta.logo From 49911d68ea930d0288a4043e6b314d9ae96ce559 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Wed, 4 Nov 2015 15:29:38 -0800 Subject: [PATCH 3/3] ok ok --- pub/tree/src/js/components/BodyComponent.coffee | 2 +- pub/tree/src/js/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pub/tree/src/js/components/BodyComponent.coffee b/pub/tree/src/js/components/BodyComponent.coffee index a59b3417c3..92ef0294bf 100644 --- a/pub/tree/src/js/components/BodyComponent.coffee +++ b/pub/tree/src/js/components/BodyComponent.coffee @@ -57,7 +57,7 @@ module.exports = query { render: -> className = (@props.meta.layout?.replace /,/g," ") || "" body = [reactify @props.body] - if document.location.hostname is 'urbit.org' and @props.meta.spam + if document.location.hostname is 'urbit.org' and @props.meta.spam? body.unshift (Spam {}, "") if @props.meta.logo? body.unshift (Logo color:@props.meta.logo) diff --git a/pub/tree/src/js/main.js b/pub/tree/src/js/main.js index 2131a8485e..396a297d76 100644 --- a/pub/tree/src/js/main.js +++ b/pub/tree/src/js/main.js @@ -519,7 +519,7 @@ module.exports = query({ var body, className, ref1; className = ((ref1 = this.props.meta.layout) != null ? ref1.replace(/,/g, " ") : void 0) || ""; body = [reactify(this.props.body)]; - if (document.location.hostname === 'urbit.org' && this.props.meta.spam) { + if (document.location.hostname === 'urbit.org' && (this.props.meta.spam != null)) { body.unshift(Spam({}, "")); } if (this.props.meta.logo != null) {