Skip to content

Commit

Permalink
Merge pull request #34 from inuyasha82/master
Browse files Browse the repository at this point in the history
Master merge
  • Loading branch information
inuyasha82 committed Mar 15, 2015
2 parents fb56698 + 08bd4ff commit 2fbfac8
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Install from [Google Chrome Web Store](https://chrome.google.com/webstore/detail

License
=================
Copyright (C) 2014 Ivan Gualandri and Davide Fiorentino
Copyright (C) 2015 Ivan Gualandri and Davide Fiorentino

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
Binary file added images/fb_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flattr-badge-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/gplus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Parameters Editor",
"version": "1.1",
"version": "1.2",

"description": "Shows parameters used in the URL and allows to update, export and import them ",

Expand Down
11 changes: 10 additions & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ function onInstall(){
});
}

function onUpdate(){
console.log("Extension Updated");
chrome.tabs.create({'url': chrome.extension.getURL('src/post_update.html')}, function(tab){
});
}

chrome.runtime.onInstalled.addListener(function(details){
var current_version = getVersion();
var old_version = localStorage['version']
Expand All @@ -56,7 +62,10 @@ chrome.runtime.onInstalled.addListener(function(details){
console.log("OnInstall Call");
localStorage['version'] = current_version;
onInstall();
} else {
localStorage['version'] = current_version;
onUpdate();
}
}
console.log("Reason: " + details.reason);
});
});
22 changes: 20 additions & 2 deletions src/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@
div#report_bug {
text-align: right;
}
div#social_bar {
display: none;
}

#report_bug a:link { color: #006699; font-weight: bold; text-decoration: none; font-size: smaller}
#report_bug a:visited { color: #006699; font-weight: bold; text-decoration: none; font-size: smaller}
#social_link a:link { color: #006699; font-weight: bold; text-decoration: none; font-size: smaller}
#social_link a:visited { color: #006699; font-weight: bold; text-decoration: none; font-size: smaller}

</style>

Expand All @@ -48,13 +53,26 @@
<div id="other_buttons">
<img id="update" src="../images/update.png"/>
<img id="addnew" src="../images/add.png"/>
<img id="export" src="../images/export.png"/>
<img id="export" src="../images/export.png"/>
<img id="import" src="../images/import.png"/>
<img id="close" src="../images/close.png"/>
<input id="myInput" type="file" style="display:none" />
</div>
<div id="report_bug">
<div>
<div id="report_bug">
<a href="https://github.com/c103/chrome_parameters/issues/new" target="_blank">Report a bug</a>
</div>
<div id="social_link">
<a id="social_button" href="#">Like it...</a>
</div>
</div>
<div>
<div id="social_bar">
<a href="https://flattr.com/submit/auto?user_id=italialinux&url=http%3A%2F%2Fc103.github.io%2Fchrome_parameters%2F" target="_blank"><img src="../images/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>
<a target="_blank" href="http://www.facebook.com/sharer.php?u=https://chrome.google.com/webstore/detail/parameters-editor/jcfdalmioobeifbpcgjghhaifimaeaca"><img src="../images/fb_button.png" /></a>
<a target="_blank" href="https://twitter.com/intent/tweet?text=Try%20Chrome%20(url)%20parameters%20editor%2C%20an%20extension%20for%20chrome%3A%20http%3A%2F%2Fgoo.gl%2FNbZdfl"><img src="../images/twitter.png" /></a>
<a target="_blank" href="https://plus.google.com/share?url=http%3A%2F%2Fgoo.gl%2FNbZdfl"><img src="../images/gplus.png" /></a>
</div>
</div>
</body>
</html>
7 changes: 6 additions & 1 deletion src/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ function click(e) {
});

});
} else if(e.target.id=="social_button"){
console.log("Show social bar");
var element = document.getElementById("social_bar")
element.style.display = "block";
}
}

Expand All @@ -49,6 +53,7 @@ function add_new_parameter(){
var div_element = document.createElement("div");
parameter_value_container.setAttribute("id", "new_parameter");
parameter_name_container.setAttribute("type", "text");
parameter_value_container.addEventListener("keypress", input_keypress);
parameter_name_container.onblur = function(){
if(this.value!=""){
var element = this.nextElementSibling;
Expand Down Expand Up @@ -258,4 +263,4 @@ function create_csv(parameters_array){
csv_file += key + "," + "\"" + parameters_array[key]+ "\"\n";
}
return csv_file;
}
}
32 changes: 32 additions & 0 deletions src/post_update.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html>
<head>
<title>Parameter Editor</title>
<style type="text/css">
body {
padding: 20;
background-color: #eaeaea;
}
</style>
</head>
<body >
<div id="container">
<h1><img src="../images/icon.png" height="80" width="80">Parameters Editor has been updated.</h1>
<h2>Changelog</h2>
New in version 1.2
<ul>
<li>Add share buttons (now you can share this extension with your friends)</li>
<li>Fix bug #32 - Enter doesn't work when a new parameter is added.</li>
<li>When the extension will be updated a changelog screen (this) appear</li>
</ul>
<h2>Source code</h2>
This extension is Open Source, released under GPLv3. You can download sources from <a href="http://c103.github.io/chrome_parameters/">GitHub</a>
</div>
<div id="social_bar" style="margin-top: 10px;>
<a href="https://flattr.com/submit/auto?user_id=italialinux&url=http%3A%2F%2Fc103.github.io%2Fchrome_parameters%2F" target="_blank"><img src="../images/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0"></a>
<a target="_blank" href="http://www.facebook.com/sharer.php?u=https://chrome.google.com/webstore/detail/parameters-editor/jcfdalmioobeifbpcgjghhaifimaeaca"><img src="../images/fb_button.png" /></a>
<a target="_blank" href="https://twitter.com/intent/tweet?text=Try%20Chrome%20(url)%20parameters%20editor%2C%20an%20extension%20for%20chrome%3A%20http%3A%2F%2Fgoo.gl%2FNbZdfl"><img src="../images/twitter.png" /></a>
<a target="_blank" href="https://plus.google.com/share?url=http%3A%2F%2Fgoo.gl%2FNbZdfl"><img src="../images/gplus.png" /></a>
</div>

</body>
</html>

0 comments on commit 2fbfac8

Please sign in to comment.