add_eattr <- function(nw, attr, f = runif){
nwn <- substitute(nw)
nw %e% attr <- f(network.edgecount(nw, na.omit = FALSE))
eval.parent(call("<-", nwn, nw), 1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.