RNAcentral / rnacentral-webcode

RNAcentral website source code
https://rnacentral.org
Apache License 2.0
30 stars 9 forks source link

error: Open Access Publications You need to pass a list of ids as a variable, e.g. search='["id1", "id2"]' #625

Closed linkzola closed 3 months ago

linkzola commented 6 months ago

I have received a prompt when using the code (below), could you guide me to a more elaborate step to handle the process?

I am trying to implement this code into my database(under development), can any corrections be made? Please let me know.

<!doctype html>
<html>
  <head>
    <title>RNAcentral LitScan</title>
      <script type="text/javascript" src="https://rnacentral.github.io/rnacentral-litscan/dist/rnacentral-litscan.js"></script>
  </head>
  <body>

  <script>
    document.addEventListener('DOMContentLoaded', function () {
        var targetElementId = 'LitScan';
            var litScanOptions = {
                target: document.getElementById(targetElementId),
                search: ['NEAT1'],
                database: {"name": "Rfam"}, // or the appropriate RNAcentral database
                maxResults: 10,
                showSummary: true
                // Add more configuration options as needed
            };
            var litScan = new LitScan(litScanOptions);
        });

</script>
<!-- Add a style block to customize the appearance -->
<style>
    /* Custom styles for the LitScan container */
    #LitScan {
        border: 1px solid #ccc;
        padding: 10px;
        margin: 10px;
        background-color: #f5f5f5;
    }
</style>
    <rnacentral-litscan search='["NEAT1"]'/>
    <div id="LitScan">
    <rnacentral-litscan search='["NEAT1"]'></rnacentral-litscan>
    <rnacentral-litscan search='["RF00001", "RF00002", "RF00003"]'></rnacentral-litscan>
    <rnacentral-litscan search='["RF00001"]' database='{"name": "Rfam"}'></rnacentral-litscan>
</div>
  </body>
</html>

image

carlosribas commented 6 months ago

Hi @linkzola,

Here is a simple example of how to use this widget:

<html>
  <head>
    <title>RNAcentral LitScan</title>
  </head>
  <body>
    <rnacentral-litscan search='["NEAT1"]'/>
    <script type="text/javascript" src="https://rnacentral.github.io/rnacentral-litscan/dist/rnacentral-litscan.js"></script>
  </body>
</html>

Find out more about this widget here: https://github.com/RNAcentral/rnacentral-litscan