Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: Evangenieur/hvid.io
base: bde09450c6
...
head fork: Evangenieur/hvid.io
compare: 76a59c13a7
  • 2 commits
  • 10 files changed
  • 0 commit comments
  • 1 contributor
View
2  lib/child_launcher.coffee
@@ -20,6 +20,7 @@ fork = (file, args) ->
spawned.stdin.write JSON.stringify obj
spawned.on_message = (cb) ->
spawned.stdout.on "data", (msg) ->
+ console.log "parent got message", arguments
try
cb JSON.parse(msg.toString())
catch e
@@ -30,7 +31,6 @@ module.exports = (file, opts, cb) ->
console.log "forking", file, opts
forked = fork file, opts
forked.on_message (obj) ->
- console.log "parent got message", arguments
cb obj
forked.on "exit", ->
console.log "Exited"
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "hvid.io",
- "version": "0.0.0-16",
+ "version": "0.0.0-22",
"description": "RealTime Video Search Twitter / Facebook / GooglePlus",
"main": "server.coffee",
"scripts": {
View
26 public/javascripts/hvidio.js
@@ -13,6 +13,17 @@
$header = $('#header'),
$clickjack = $('#clickjack');
+ var urlify = function (str) {
+ return str.replace(/\s/g, '_')
+ .replace(/:/g, '-')
+ .replace(/\\/g, '-')
+ .replace(/\//g, '-')
+ .replace(/[^a-zA-Z0-9\-_]+/g, '')
+ .replace(/-{2,}/g, '-')
+ .toLowerCase();
+ }
+
+
window.hvidio = {
init: function() {
@@ -37,6 +48,7 @@
// socket
socket = io.connect("http://"+window.location.host);
socket.on("connect", function() {
+ console.log("CONNECTED");
Search.com_init(socket);
});
@@ -180,7 +192,7 @@
console.log("PASSE PAR LA CALLBACK");
$main.addClass('large');
- hvidio.templatize('#videosTemplate', { videos: data }, '#results');
+ hvidio.templatize('#videosTemplate', { search: urlify(keyword), videos: data }, '#results');
hvidio.initScroll();
@@ -266,17 +278,19 @@
search.initiated = true;
scroll = false;
callback([this]);
- $list = $("#video-list")
} else {
var html = hvidio.templatize('#videoTemplate', { video: this });
+ var $mylist = $("#video-list-" + urlify(keyword));
//$list.append(html);
-
+ /*
+ $mylist.append(html);
+ $(html).fadeIn()
+ */
var $html = $(html);
- $list.append($html);
+ $mylist.append($html);
$html.css('visibility','visible').hide().fadeIn('slow');
-
hvidio.initScroll();
}
@@ -368,7 +382,7 @@
} else {
embed += "&"
}
- embed += "wmode=transparent&autoplay=1"
+ embed += "wmode=transparent&autoplay=1&autohide=1"
$player.attr('src', embed);
View
6 public/stylesheets/style.css
@@ -162,7 +162,7 @@ p.tagline {
height: 0;
position: relative;
z-index: 1;
- margin-top: 20px;
+ padding-top: 20px;
}
#results #video-list {
margin: 20px 1%;
@@ -273,6 +273,10 @@ p.tagline {
font-size: 10px;
}
#results .video .video-cell img.preview {
+ /*
+ width: 217px;
+ height: 127px;
+ */
min-width: 215px;
min-height: 122px;
max-height: 120px;
View
2  public/stylesheets/style.less
@@ -212,7 +212,7 @@ p.tagline {
height: 0;
position: relative;
z-index:1;
- margin-top: 20px;
+ padding-top: 20px;
#video-list {
margin: 20px 1%;
View
2  server.coffee
@@ -6,7 +6,7 @@ require('zappajs') ->
@use "static", "favicon", require('less-middleware')({ src: __dirname + '/public' })
@set 'view engine': 'jade'
- @io.set 'log level', 1
+ @io.set 'log level', 2
@get "/": ->
@render "index"
View
4 views/index.jade
@@ -33,7 +33,7 @@ block content
div#close
script#videosTemplate(type='text/template')
- | <ul id="video-list">
+ | <ul id="video-list-<%= search %>">
| <% _.each(videos, function(video) { %>
| <% include videoTemplate %>
| <% }) %>
@@ -62,7 +62,7 @@ block content
| <li>
| <time datetime="<%= video.msgs[0].post_date %>"><%= video.date %></time>
| <br>
- | from <a class="from" href="<%= video.url %>"><%= video.provider %></a>
+ | from <a class="from" href="<%= video.url %>"><%= video.msgs[0].provider %></a>
| </li>
| </li>
| </div>
View
4 workers/facebook_search_worker.coffee
@@ -34,7 +34,7 @@ video_search = (search, opts = {}) ->
).map (post) ->
url = post.link
return unless url
- console.log post.from
+ #console.log post.from
msg =
provider: "facebook"
id: "facebook/#{post.id}"
@@ -53,7 +53,7 @@ video_search = (search, opts = {}) ->
vdo = {}
vdo.title = post.name if post.name?
- vdo.embed = post.source if post.source?
+ #vdo.embed = post.source if post.source?
vdo.thumbnail = thumb if thumb?
video_platforms.getVideoFromMsg msg, url, vdo
View
2  workers/googleplus_search_worker.coffee
@@ -17,7 +17,7 @@ video_search = (search, opts = {}) ->
opts_str += "#{k}=#{v}&"
url = "https://www.googleapis.com/plus/v1/activities?key=#{google_conf.api_key}&query=#{encodeURIComponent search}&#{opts_str}"
- console.log url
+ #console.log url
request url,
(err, res, body) ->
try
View
1  workers/twitter_search_worker.coffee
@@ -29,6 +29,7 @@ video_search = (search, opts = {}) ->
_(tweets).chain().map (tweet) ->
_(tweet.entities.urls).map (url) ->
url = url.expanded_url
+ #console.log url
msg =
provider: "twitter"
id: "twitter/#{tweet.id_str}"

No commit comments for this range

Something went wrong with that request. Please try again.