How can i add inner HTML under a specific Node - innerhtml

I'm trying to learn scripting but im lost
I added Inner HTML under a Node using inspector tool as the below screenshot showing but i'm not sure how to make user script to keep the change after reload the page...
Added Inner under node

Look here
as in example :
let p = document.createElement("p");
document.body.appendChild(p);
you can go too desire nest by
document.querySelector()
You can see that
here
But to keep changes you have to make your own website and write that script in your's js file

Related

Is there a way to create a link that will execute a YouTrack command such as clone issue?

The "Generate Issue Template URL" functionality is clunky, and I'm try to work around it. I have a webpage outside of YouTrack with a list of links containing different templates for ticket writers. Any time a template changes we have to click the "generate issue template" then go update that link on our other web page. It would be nice to simply link to a template, by ID, that when saved will create a new issue or instead link directly to the clone command. The intent is that we won't have to update our template links going forward, and ticket writers will always get the latest version of the template they need.
Ideally it would be best if the entire call to YT could be in the href attribute of a link, but using AJAX is an option as well.
YT Version: 2021.3.22256
I've tried this, and a couple of variations, with no luck:
Template 1
In YouTrack there's no link you can pass a command into to get get it executed.
What you can do is to compose a workflow script to autofill issue fields as required. The only remaining bit is some kind of trigger to get script started. For that you can still use "Generate Issue Template URL" functionality with a single fields or any other marker to let the script recognize the right change to react to.

How to requiere a js file in Fiddle.js

I'm trying to make a fiddlejs.
The Code use a VueJS plugin called VueDragula, inside the code, I have:
let VueDragula = require('../vue-dragula');
Vue.use(VueDragula);
So, I uploaded vue-dragula.js to my own server, and added it to external resources, and delete the 2 lines, but now, it says
VueDragula is not defined
I also tried to include directly the content of vue-dragula inside the JS, but happened the same thing.
How should I do that???

Aurelia tutorial stuck building out contact list

I'm an experienced WPF developer, but new to web development.
I'm stuck at point where you replace the Contact List Placeholder
with the contact-list custom element.
When I run it the web page still shows the placeholder text instead of the contact list. I assumed this was a cache issue, but I've tried everything I can think of to clear the cache. I have also tried deleting the app.html and running the site to see what kind of error I'd get, but still I get the template with Contact List Placeholder. I've tried reverting to the original tag and changing the inner text, and I still get "Contact List Placeholder".

Svg-edit usage reference where i can find it?

I found this tool(https://code.google.com/p/svg-edit/) very useful, but there is any reference for this project allow to integrate properly in your applicatione instead of simply add it to an iframe?
For example i want to retrieve the svg code for save it in a variables or something like this
It's possible but might be a little tricky to strip out the required resources and load them in your own application while making sure that there aren't any conflicts. This is actually something I plan on doing for one of my own projects.
Do you need to do this though? You can talk to the iframe from your application pretty easily. For example, to get the SVG content you would use this (assuming you only have 1 iframe on the page) ->
var svgedit = window.frames[0];
svgedit.svgCanvas.svgCanvasToString();

How can I display Joomla modules within a component?

I have a component with several categories of games and I want to display a different banner depending on the category. I need the banner (and link) to be customizable so it's not simply a case of showing categoryX.jpg or whatever.
I saw this Joomla help page on another question, but it only seems to display a module type, not one specific module. I'd like to use various mod_custom modules and display the one appropriate to the category (I can store each module's ID if necessary).
Any ideas?
This can be done in a 2 step process:
Use the "Load module into article" plugin to allow yourself to access the module using a plugin call like:
{module [*mod_id*]} // where *mod_id* is the module id
Now that you can call a plugin to put your module anywhere, you now need to go to the view code of your/a component you wish to add the module to and add this code:
echo JHTML::_('content.prepare', '{module [*mod_id*]}');
Please see this link - http://www.alltogetherasawhole.org/group/developers/forum/topics/running-joomla-content-plugins - regarding point number 2. I was trying to do the same thing and I found it didn't work, and the reason for this was a comment you can find on the page link above:
"I noticed that some plugin actually expect option=com_content for them to process onPrepareContent properly, so you might actually want to "fool" them by callin JRequet::setVar and restoring the correct values after the trigger."
If you would like to show module within PHP code then use this code, it's worked for me :
<?php echo JHTML::_('content.prepare', '{loadposition position-2}'); ?>
If you want to show module inside html content then just put this code where you want to show module.
{loadposition position-2}
It loads all modules which are assigned to position-2.
You can also use the Joomla Module Renderer
$doc = JFactory::getDocument();
$renderer = $doc->loadRenderer('modules');
$position = 'custom_position_name';
$options = array('style' => 'raw');
echo $renderer->render($position, $options, null);
Just a heads up, Along with being assigned the module position, that module also has to be set to "Display on All pages".
Joomla has this functionality built in. You can use the {loadposition XX} command within your content items. You can specify custom module positions that do not appear in your template to insure that you have the correct module in the correct article.
http://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F
You could create a new module?
If each category appears in the querystring (catid=X) then you could take a similar approach to https://support.pillwax.com/open-source/doku.php?id=joomla:header_image.
Alternatively, that link might actually do it for you.