Permalink
Browse files

Fortunas

Tu fortuna: Descubrirás que Hispachan tiene reglas y las leerás por primera vez después de años.
  • Loading branch information...
1 parent 8951740 commit eb6949c283e6644e28efcff6520cb4adde7ea3e5 @HispachanFiles committed Jul 7, 2016
Showing with 21 additions and 0 deletions.
  1. +13 −0 components/parsers/parsePost.js
  2. +2 −0 models/thread.js
  3. +6 −0 views/hispachan/post.jade
@@ -41,6 +41,19 @@ function postMeta(post, $) {
data.dado = dC.find('b').text();
dC.remove();
}
+
+ // Fortunas [Julio 2016]
+ let fort = post.find('blockquote').first().find('font[color="red"]')
+ if(fort.length > 0)
+ {
+ let fortxt = fort.find('b').text();
+ if(fortxt.substr(0, 11) == 'Tu fortuna:')
+ {
+ data.fortuna = fortxt.substr(11).trim();
+ fort.remove();
+ }
+ }
+
// Mensaje
let html = post.find('blockquote').first().html();
// Convertir HTML a BBCode de Hispa
View
@@ -17,6 +17,7 @@ module.exports = mongoose.model('Thread', {
date: Date,
lastUpdate: { type: Date, default: Date.now },
dado: String,
+ fortuna: String,
message: String,
file: {
url: String,
@@ -34,6 +35,7 @@ module.exports = mongoose.model('Thread', {
flag: String,
date: Date,
dado: String,
+ fortuna: String,
message: String,
file: {
url: String,
@@ -33,6 +33,12 @@ blockquote(style='word-wrap: break-word;')
b #{post.dado}
br
br
+ //- Fortunitas :3
+ if post.fortuna
+ font(color='red')
+ b Tu fortuna: #{post.fortuna}
+ br
+ br
| {{{#{JSON.stringify(post.message)} | renderPostMessage}}}
br
br

0 comments on commit eb6949c

Please sign in to comment.