hacker-news: Use ui-running?
parent
2f99a33e36
commit
e1b8eaa9fa
|
@ -2,8 +2,8 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors assocs classes.tuple colors.constants
|
USING: accessors assocs classes.tuple colors.constants
|
||||||
colors.hex combinators formatting fry hashtables http.client io
|
colors.hex combinators formatting fry hashtables http.client io
|
||||||
io.streams.256color.private io.styles json json.reader kernel
|
io.styles json json.reader kernel make math math.parser
|
||||||
make math math.parser namespaces sequences splitting urls ;
|
sequences splitting ui urls ;
|
||||||
IN: hacker-news
|
IN: hacker-news
|
||||||
|
|
||||||
TUPLE: post title postedBy points id url commentCount postedAgo ;
|
TUPLE: post title postedBy points id url commentCount postedAgo ;
|
||||||
|
@ -31,11 +31,7 @@ TUPLE: post title postedBy points id url commentCount postedAgo ;
|
||||||
: write-title ( title url -- )
|
: write-title ( title url -- )
|
||||||
'[
|
'[
|
||||||
_ presented ,,
|
_ presented ,,
|
||||||
output-stream get 256color? [
|
ui-running? COLOR: black COLOR: white ? foreground ,,
|
||||||
COLOR: white foreground ,,
|
|
||||||
] [
|
|
||||||
COLOR: black foreground ,,
|
|
||||||
] if
|
|
||||||
] H{ } make format ;
|
] H{ } make format ;
|
||||||
|
|
||||||
: write-link ( title url -- )
|
: write-link ( title url -- )
|
||||||
|
|
Loading…
Reference in New Issue