Skip to content

Commit

Permalink
FireFox Review
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonardoCiaccio committed Oct 30, 2017
1 parent 30c8b49 commit a6f6cdd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"manifest_version" : 2,
"author" : "Leonardo Ciaccio",
"version" : "6.1.7.3",
"version" : "6.1.7.6",
"name" : "Grab Any Media",
"default_locale" : "en",
"description" : "__MSG_des__",
Expand Down
10 changes: 4 additions & 6 deletions Extension/module/dailymotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
"use strict";

var
externalAPI = "https://www.10convert.com/watch?v={%c}&utm_source=GrabAnyMedia&utm_medium=extension"

,api = "http://www.dailymotion.com/player/metadata/video/{%c}"
api = "http://www.dailymotion.com/player/metadata/video/{%c}"

,_noCache = function( link ){

Expand Down Expand Up @@ -140,9 +138,9 @@
,_getVideoCode = function( link ){

var
reCanonical = /^(https\:\/\/|http\:\/\/|\/\/).*dailymotion\..*\/video\/:?/gi
reCanonical = /^(https\:\/\/|http\:\/\/|\/\/)(?:www\.)?dailymotion\..*\/video\/:?/gi

,reEmbed = /^(https\:\/\/|http\:\/\/|\/\/).*dailymotion\..*\/embed\/video\/:?/gi
,reEmbed = /^(https\:\/\/|http\:\/\/|\/\/)(?:www\.)?dailymotion\..*\/embed\/video\/:?/gi

,tmp
;
Expand Down Expand Up @@ -249,7 +247,7 @@

_findLinks( videocode, function( response ){

if( !response || response.length < 1 )return callback(); //return callback( externalAPI.replace( /\{\%c\}/gi, videocode ) );
if( !response || response.length < 1 )return callback();

return callback( response );

Expand Down
12 changes: 5 additions & 7 deletions Extension/module/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
"use strict";

var
externalAPI = "https://www.10convert.com/watch?v={%c}&utm_source=GrabAnyMedia&utm_medium=extension"

,_toDownload = function( newpage, link, title ){
_toDownload = function( newpage, link, title ){

if( newpage ){

Expand Down Expand Up @@ -313,10 +311,10 @@
}

}

if( !link.match( /^(https\:\/\/|http\:\/\/|\/\/).*facebook\..*\/.*\/videos\/:?/gi )/* &&
if( !link.match( /^(https\:\/\/|http\:\/\/|\/\/)(?:www\.)?facebook\..*\/.*\/videos\/:?/gi )/* &&
!link.match( /^(https\:\/\/|http\:\/\/|\/\/).*facebook\..*\/plugins\/video.php:?/gi )
!link.match( /^(https\:\/\/|http\:\/\/|\/\/)(?:www\.)?facebook\..*\/plugins\/video.php:?/gi )
*/){

alert( chrome.i18n.getMessage( "fb_to_video" ) );
Expand All @@ -327,7 +325,7 @@

_findLinks( link, function( response ){

if( !response || response.length < 1 )return callback(); //return callback( externalAPI.replace( /\{\%c\}/gi, videocode ) );
if( !response || response.length < 1 )return callback();

return callback( response );

Expand Down
10 changes: 4 additions & 6 deletions Extension/module/vimeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
"use strict";

var
externalAPI = "https://www.10convert.com/watch?v={%c}&utm_source=GrabAnyMedia&utm_medium=extension"

,api = "https://player.vimeo.com/video/{%c}/config"
api = "https://player.vimeo.com/video/{%c}/config"

,_noCache = function( link ){

Expand Down Expand Up @@ -140,9 +138,9 @@
,_getVideoCode = function( link ){

var
reCanonical = /^(https\:\/\/|http\:\/\/|\/\/).*vimeo\..*\/:?/gi
reCanonical = /^(https\:\/\/|http\:\/\/|\/\/)(?:www\.)?vimeo\..*\/:?/gi

,reEmbed = /^(https\:\/\/|http\:\/\/|\/\/).*vimeo\..*\/video\/:?/gi
,reEmbed = /^(https\:\/\/|http\:\/\/|\/\/)(?:www\.)?vimeo\..*\/video\/:?/gi

,tmp
;
Expand Down Expand Up @@ -233,7 +231,7 @@

_findLinks( videocode, function( response ){

if( !response || response.length < 1 )return callback(); //return callback( externalAPI.replace( /\{\%c\}/gi, videocode ) );
if( !response || response.length < 1 )return callback();

return callback( response );

Expand Down
4 changes: 2 additions & 2 deletions Extension/module/youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@
,_getVideoCode = function( link ){

var
reCanonical = /^(https\:\/\/|http\:\/\/|\/\/).*youtube\..*\/watch\?:?/gi
reCanonical = /^(https\:\/\/|http\:\/\/|\/\/)(?:www\.)?youtube\..*\/watch\?:?/gi

,reEmbed = /^(https\:\/\/|http\:\/\/|\/\/).*youtube\..*\/embed\/:?/gi
,reEmbed = /^(https\:\/\/|http\:\/\/|\/\/)(?:www\.)?youtube\..*\/embed\/:?/gi
;

if( link.match( reCanonical ) ){
Expand Down

0 comments on commit a6f6cdd

Please sign in to comment.