Skip to content

Instantly share code, notes, and snippets.

@martin12333
Last active October 29, 2017 18:00
Show Gist options
  • Save martin12333/640a6751aeaa86432cdef6e4d3fe9745 to your computer and use it in GitHub Desktop.
Save martin12333/640a6751aeaa86432cdef6e4d3fe9745 to your computer and use it in GitHub Desktop.
//Assuming that you're using version 2.1, then you could dig into the Javascript source code of your Google Refine download and hack this feature. Take a look at this file and line:
//http://code.google.com/p/google-refine/source/browse/tags/2.1/main/webapp/modules/core/scripts/views/data-table/cell-ui.js#75
//You would want to change it to something like this
} else if (URL.looksLikeUrl(cell.v)) {
if (cell.v.endsWith(".jpg") || cell.v.endsWith(".jpeg") || cell.v.endsWith(".png")) {
$('<img>')
.attr("src", cell.v)
.attr("href", cell.v)
.attr("target", "_blank")
.appendTo(divContent);
} else {
$('<a>')
.text(cell.v)
.attr("href", cell.v)
.attr("target", "_blank")
.appendTo(divContent);
}
} else {
...
//David
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment