diff --git a/changelog.md b/changelog.md index 663eec8..ae5eaa2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +v0.3.1 +* Fork from official repository in order to re-enable "Clone Board" feature + v0.3 * Updated selector for clone button to support Trello Changes. diff --git a/chrome/inject/trello_clone_button.js b/chrome/inject/trello_clone_button.js index 066eb90..1c2f455 100644 --- a/chrome/inject/trello_clone_button.js +++ b/chrome/inject/trello_clone_button.js @@ -1 +1 @@ -var trello_clone_button_source = "\x2F** Adds a button to the right board widget content area that allows the user to clone the current board. *\x2F\n$(\"a:contains(Board Menu)\").livequery(function() {\n\tvar boardContent = $(this).parent();\n\tvar button = $(\'\x3Ca class=\"button-link highlight-icon\"\x3E Clone Board \x3C\x2Fa\x3E\');\n\tbutton.click(function() {\n\t\tvar name = prompt(\"Enter a name for the new board:\", \"Clone of \" + boardView.model.get(\"name\"));\n\t\tif(name) {\n\t\t\tcloneCurrentBoard(name);\n\t\t}\n\t});\n\n\tboardContent.append(button);\n});" +var trello_clone_button_source = "\x2F** Adds a button to the right board widget content area that allows the user to clone the current board. *\x2F\n$(\"a:contains(Unpin from)\").livequery(function() {\n\tvar boardContent = $(this).parent().parent();\n\tvar button = $(\'\x3Cli\x3E\x3Ca class=\"js-clone-board\"\x3E Clone Board \x3C\x2Fa\x3E\x3Cli\x3E\');\n\t$(\'a\', button).click(function() {\n\t\tvar name = prompt(\"Enter a name for the new board:\", \"Clone of \" + boardView.model.get(\"name\"));\n\t\tif(name) {\n\t\t\tcloneCurrentBoard(name);\n\t\t}\n\t});\n\n\tbutton.insertAfter($(this));\n});" \ No newline at end of file diff --git a/chrome/manifest.json b/chrome/manifest.json index 0cd9518..a5fb6a8 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -1,6 +1,6 @@ { "name": "Trello Clone", - "version": "0.3", + "version": "0.3.1", "description": "Clone a Trello Board", "icons": { "128": "images/128-icon.png" }, "homepage_url": "https://github.com/oo7ph/Trello-Clone", diff --git a/chrome/source/trello_clone_button.js b/chrome/source/trello_clone_button.js index 548ab03..3b84b2c 100644 --- a/chrome/source/trello_clone_button.js +++ b/chrome/source/trello_clone_button.js @@ -8,15 +8,15 @@ */ /** Adds a button to the right board widget content area that allows the user to clone the current board. */ -$("a:contains(Board Menu)").livequery(function() { - var boardContent = $(this).parent(); - var button = $(' Clone Board '); - button.click(function() { +$("a:contains(Unpin from)").livequery(function() { + var boardContent = $(this).parent().parent(); + var button = $('
  • Clone Board
  • '); + $('a', button).click(function() { var name = prompt("Enter a name for the new board:", "Clone of " + boardView.model.get("name")); if(name) { cloneCurrentBoard(name); } }); - boardContent.append(button); + button.insertAfter($(this)); });