Login

russian armor

javascript link in stream names

24 Jul 2014, 13:51 PM
#1
avatar of tuvok
Benefactor 115

Posts: 786

just a little thing that's been bugging me since forever, you've got this js redirect on the livestreams links that prevents me from ctrl+clicking to open it in a new tab

Code
function trackStream() {
$('.performView').on('click', function(e) {
e.preventDefault();
var $this = $(this),
url = $this.attr('href');
switch (e.which) {
case 2:
COH2ORG.Lib.request('/livestream/performView/chan_id/' + parseInt($(this).data('id'), 10));
window.open(url);
break;
default:
if ($this.attr('target') === '_blank') {
COH2ORG.Lib.request('/livestream/performView/chan_id/' + parseInt($(this).data('id'), 10));
window.open(url);
} else {
COH2ORG.Lib.request('/livestream/performView/chan_id/' + parseInt($(this).data('id'), 10), function() {
window.location.href = url;
}, function() {
window.location.href = url;
});
}
}
});
}

it's a normal <a tag so I don't see the need for all of this since it's not doing anything special
25 Jul 2014, 23:56 PM
#2
avatar of hicksi
Admin Black Badge

Posts: 983 | Subs: 3

use your middle mouse button, that works great :)
i hope that is a solution for you :)
Seb
26 Jul 2014, 21:22 PM
#3
avatar of Seb
Admin Black Badge

Posts: 3709 | Subs: 2

I don't know if you remember but I also hate that ctrl + click doesn't work for that.

For a start, middle button is not a solution on a laptop. :(
26 Jul 2014, 21:25 PM
#4
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

Middle mouse button does not work me, at all. The javascript still manages to force the Stream to open in the same window.
27 Jul 2014, 00:16 AM
#5
avatar of hicksi
Admin Black Badge

Posts: 983 | Subs: 3

okay it's not really hard to fix :)
i wasn't aware that the middle mouse button doesn't work in any browser and the laptop argument is pretty good point
27 Jul 2014, 18:06 PM
#6
avatar of hicksi
Admin Black Badge

Posts: 983 | Subs: 3

okay ctrl click should work now. in order to make it work properly you need to allow coh2org to open a new popup window. the dialog should be opened on the first ctrl click
28 Jul 2014, 09:23 AM
#7
avatar of Marcus2389
Developer Relic Badge
Donator 11

Posts: 4559 | Subs: 2

I confirm it works.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

368 users are online: 3 members and 365 guests
MajorBloodnok, shinasukac, Crecer13
12 posts in the last 24h
38 posts in the last week
92 posts in the last month
Registered members: 44643
Welcome our newest member, Leiliqu96
Most online: 2043 users on 29 Oct 2023, 01:04 AM