How to introduce mobile support?

Hi,I have a plug-in, which supports the interface watermark of PC, and I hope the mobile can also be supporting, but it seems that the configuration() of does not take effect, is there any case that can refer to the development of the mobile plug-in?

Hi @chenkaiyin1201,

Can you please provide the community with more information.
Like which product your working on, what is the code your using for the watermark,…

Can you also please move your topic to the relevant category in the community and add some tags?
Both will help you get an answer to you question quicker.


First of all,I am Sorry that I cannot provide more information because of the reason.
In short,I want to import javascript scripts into the confluence page.The code is in subsequent scripts, but the imported js script don`t work.


<device-type-renderer name="Mobile Renderer" key="mobileViewRenderer">
        <description>The renderer used for rendering content in Confluence Mobile.</description>

    <rest key="mobileRest" name="MobREST API" path="/js" version="1.0"/>
    <resource type="download" name="js/" location="/js/"/>
    <web-resource key="plugin-mobile-resources" name="Plugin Mobile Resources">
        <resource type="download" name="mobile-redirect.js" location="/js/plugin-mobile.js"/>

js script

(function($) {
    AJS.toInit(function() {
        window.onload = function (ev) {

The problem is probably that you can’t use AJS.toInit on mobile. (Source)

Instead you need to use:

ConfluenceMobile.contentEventAggregator.on("displayed", function() {});

So in your script you could do this:

(function($) {
    function onDocumentLoad() {
        window.onload = function (ev) {

    if (window.ConfluenceMobile) {
        ConfluenceMobile.contentEventAggregator.on("displayed", onDocumentLoad);
    } else {

Can I ask May I ask about atlassian-plugin.xml?
Here is my configuration, but it only works on PC, not mobile

<atlassian-plugin key="${atlassian.plugin.key}" name="${}" plugins-version="2">
        <vendor name="${}" url="${project.organization.url}" />
        <param name="plugin-icon">images/pluginIcon.png</param>
        <param name="plugin-logo">images/pluginLogo.png</param>

    <!-- add our i18n resource -->
    <resource type="i18n" name="i18n" location="plugin"/>
    <!-- add our web resources -->
    <web-resource key="=plugin-resources" name="plugin Web Resources">
        <resource type="download" name="plugin.css" location="/css/plugin.css"/>
        <resource type="download" name="plugin.js" location="/js/plugin.js"/>
        <resource type="download" name="images/" location="/images"/>


Hi,you can use in your web-resource , and javaScript could run in mobile web

And also , javascript may require some other rules to follow in mobile web which I’m investigating (I need to make my web plugin avaliable with mobile device type , too)

I’m interested in answers to the original question in a more general way. It is good to know that some particular JavaScript API is not available in mobile for this app but then it’s death by a thousand cuts to figure out full mobile support for a plugin/app.

I’m thinking that the OP was asking for some reference documentation on how to develop mobile plugins. Does such a thing exist?