floodmeadows / DTX show project codes power app

// ==UserScript==
// @name         DTX show project codes power app
// @namespace    https://openuserjs.org/users/floodmeadows
// @description  Shows the "project codes" power app alongside the Time & Expense details view in web DTX
// @copyright    2023, floodmeadows (https://openuserjs.org/users/floodmeadows)
// @license      MIT
// @version      0.1
// @author       andy@floodmeadows.com
// @include      https://*/DTX.NET/item.aspx*
// @updateURL    https://openuserjs.org/meta/floodmeadows/DTX_show_project_codes_power_app.meta.js
// @downloadURL  https://openuserjs.org/install/floodmeadows/DTX_show_project_codes_power_app.user.js
// @icon         https://www.google.com/s2/favicons?sz=64&domain=capgemini.com
// @grant        none
// ==/UserScript==

/* jshint esversion: 6 */

(function() {
    'use strict';

    const targetElement = document.getElementById('tlbMenu');
    addiFrame(targetElement);
    applyStyles();
})();

function addiFrame(targetElement) {
    const iframe = document.createElement("iframe");
    iframe.setAttribute("id","projectCodesHelper");
    iframe.width = "800";
    iframe.height = "600";
    iframe.src = "https://apps.powerapps.com/play/e/d7d95d35-cc03-e4a7-8a28-fc4b008b61a2/a/48db8062-2740-4396-94c2-80e15cb2c4a6?tenantId=76a2ae5a-9f00-4f6b-95ed-5d33d77c4d61%20";
    targetElement.after(iframe);
}

function applyStyles() {
    document.getElementById('tlbMenu').setAttribute("style", "display:inline-block;");
    document.getElementById('projectCodesHelper').setAttribute("style", "display:inline-block; position:absolute; top:75px; left:808px; border: none;");
}