mirror of
https://github.com/c0de-archive/Fox.ci_Chrome_Extension.git
synced 2024-12-22 05:42:39 +00:00
Remove browser_action
This contained jQuery, popup.js, browser_action.html We don't need a large library like jQuery when native functions work popups are a thing of the past :3 browser_action was just popup.html renamed, not needed either Signed-off-by: David Todd <c0de@unps.us>
This commit is contained in:
parent
01d2275d91
commit
720fcd78a5
@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html> <!-- The new doctype -->
|
||||
<html>
|
||||
<head> <!-- No title and meta tags are necessary for the extension -->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<script src="jquery.js"></script> <!-- Including jQuery -->
|
||||
<script src="popup.js"></script> <!-- Our script file -->
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="content">
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
8755
Fox.ci_Chrome_Extension/src/browser_action/jquery.js
vendored
8755
Fox.ci_Chrome_Extension/src/browser_action/jquery.js
vendored
File diff suppressed because it is too large
Load Diff
@ -1,50 +0,0 @@
|
||||
var currentURL;
|
||||
|
||||
window.onload = function () {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
chrome.tabs.query({active: true, currentWindow: true}, function(arrayOfTabs) {
|
||||
|
||||
// since only one tab should be active and in the current window at once
|
||||
// the return variable should only have one entry
|
||||
var activeTab = arrayOfTabs[0];
|
||||
var activeTabId = arrayOfTabs[0].id;
|
||||
var activeTabURL = arrayOfTabs[0].url;
|
||||
|
||||
currentURL = activeTabURL;
|
||||
|
||||
|
||||
$.get( "http://fox.ci/api/?url="+currentURL )
|
||||
.done(function( data ) {
|
||||
//alert( "Data Loaded: " + data );
|
||||
|
||||
var obj = jQuery.parseJSON(data);
|
||||
|
||||
if((obj.statuscode==="100")||(obj.statuscode==="101")){
|
||||
|
||||
|
||||
var copyFrom = $('<textarea/>');
|
||||
copyFrom.text(obj.shorturl);
|
||||
$('body').append(copyFrom);
|
||||
copyFrom.select();
|
||||
document.execCommand('copy');
|
||||
|
||||
$("#content").append("Fox.ci ShortURL copied to clipboard!<br>");
|
||||
|
||||
|
||||
}else{
|
||||
document.write("Error: "+obj.statusdescription);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user