Additional resource/ js files added by Kentico? - kentico

I view sourced a site I built with Kentico (v9) and noticed there're many js files added (sample list below) that I've never used or added myself in any of my templates. Is there a place/file where I can manage this listing? One of the resource file returns a 404, and the jquery-core is redundant (because I used and linked to a different jquery file in the master template)
Edit: To clarify, I've created the site from scratch myself using Portal Engine, so I know which files are in use/needed, but the system was set up by a different team, so I'm not sure about those resources and how they got in there.
<script src="/WebResource.axd?d=tOC6-8tIvm-6k-UeWp5sUWPuNRu5mtP3WV2AZEfL9nI2sRmgKd5MnlDVvBjdzVe9wwB392nFnls5rAu3Ry5vq1yWL8h_-l2ltMTIVb8BU3E1&t=637346642097037378" type="text/javascript"></script>
<script src="/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fWebServiceCall.js" type="text/javascript"></script>
<script src="/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fRequireJS%2frequire.js" type="text/javascript"></script>
<script src="/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fRequireJS%2fconfig.js&resolvemacros=1" type="text/javascript"></script>
<script src="/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fcms.js" type="text/javascript"></script>
<script src="/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fjquery%2fjquery-core.js" type="text/javascript"></script>

Most of these are things added by various Controls (webparts), not much you can do about it, it's the nature of WebForms that in order for certain things to work it needs to pull in the javascript this way.

Related

How to run web components based HTML without node?

I was following the section "How do I use a web component?" from
What are web components?
end very soon I realized that node and npm it's a must. On top of that you have to run node to serve it.
Code
<html>
<head>
<script type="module" src="node_modules/#polymer/paper-button/paper-button.js"></script>
</head>
<body>
<paper-button raised class="indigo">raised</paper-button>
</body>
</html>
What is the simplest - no node - way to run this simple web component?
Disregard everything "Polymer",
better yet... burn it down, throw your coffee over every monitor you see that title.
It was based on the V0 implementation of Web Components;
which basically was Google's lets-throw-something-at-the-wall-and-see-if-other-vendors-adopt-it attempt at forcing Web Components on us.
That whole V0 era is what gave "Web Components" a bad reputation, and catchy blog titles like
"The Broken Promise of Web Components"
(but everyone involved learned what not to do)
Since years, all Browsers vendors work together on V1
Web Components run in all modern Browsers.. period.. so all you need is a Browser..
no built steps.. no bundlers.. no parcel.. no Svelte-compiler... no Rome... no fuss
Use any online editor like JSFiddle or CodePen, or your own IDE, or use your F12 Sources panel
and with a few lines of code you are started
<my-component name="Alex"></my-component>
<script>
customElements.define("my-component", class extends HTMLElement {
connectedCallback() {
this.innerHTML = `<h2>${this.getAttribute("name")} his very first Custom Element!</h2>`;
}
});
</script>
The 3 distinct (each can be used without the other) technologies making up "Web Components" help you built more complex Components
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM
Soon you will read about Lit and Hybrids and Stencil and uCe, and all types of tools that make developing Web Components "easier"...
They are just that... tools; You pick one or two once you fully understand the technology
The simplest way would probably be to just include the script via a CDN like UNPKG https://unpkg.com/.
<html>
<head>
<script
type="module"
src="https://unpkg.com/#polymer/paper-button#3.0.1/paper-button.js?module"></script>
</head>
<body>
<paper-button raised class="indigo">raised</paper-button>
</body>
</html>

IE9 HTTPS security is compromised by http://v.zilionfast.in

I have a problem with https security in IE9 only... the message talk about an url that doesn't exist in my code "http://v.zilionfast.in/257344370/?t=vrt".
The issue was detected in different pc (in different networks) with IE9, some of them show the error message, others doesn't show anything.
I have no clue about what script is calling this url because i can't find it. Somebody have a clue about what is happening?
this is the code of the header basically:
<script type="text/javascript" src="#rutaIni#/swfobject.js"></script>
<script type="text/javascript" src="#rutaIni#/basicos.js"></script>
<script type="text/javascript" src="#rutaIni#/prototype-packed.js"></script>
<script type="text/javascript" src="#rutaIni#/scriptaculous.js"></script>
<script type="text/javascript" src="#rutaIni#/glider.js"></script>
<script src="#rutaIni#/modalbox.js" type="/text/javascript"></script>
<link href="#rutaIni#/modalbox.css" rel="stylesheet" type="text/css" media="screen" />
the other part of the code is just a table that is filled with a query and some html (no problem with that).
thank you!!!
It looks like this site is flagged by Vipre and other Internet Security and Antivirus programs to be malicious. It is possible that your web browser has been infected or your code contains elements associated with the site. The only way to know for sure is for you to post your code.

Sharepoint 2013 include javascript on homepage with CustomAction

I deploy a sandboxed solution to a Sharepoint 2013 site with an CustomAction setting to include my javascript file on every page like this:
<CustomAction ScriptSrc="MyScriptUrl.js" Location="ScriptLink" Sequence="10000">
This works fine on all pages the page is rendered like this and my script link is included:
...
<script type="text/javascript" src="/_layouts/15/1033/initstrings.js?rev=uNmvBiHdrBzcPQzXRpm%2FnQ%3D%3D"></script>
<script type="text/javascript" src="/_layouts/15/clienttemplates.js?rev=vtrc0n3sjgxKB4WQrCEeaA%3D%3D"></script>
<script type="text/javascript" src="/_layouts/MyApp/MyScriptUrl.js"></script>
...
But on the home page (start.aspx) my link is missing and the js includes are quite different:
...
<script type="text/javascript" src="/_layouts/15/init.js?rev=zwpf9CD1m7am6imImmQglQ%3D%3D"></script>
<script type="text/javascript" src="/ScriptResource.axd?d=nnhGXhlC0O1qfk6HXinkGyT_1TJisFpYK2ABJoGzI-IJfbkEQ8O-FNAr_1TgMft0D4TC2OewVZXiRooP_-SU74hHHu0AiGA4sSA3rrm1cvMqv3QRvFv8PafLyLDxWfN1O4qPFJXWfAf3avBHVS0HiXP55em_jNSsNMvRj1GJO4rjzyxg1vBi7IfXVHSWNBK60&t=6119e399"></script>
<script type="text/javascript" src="/_layouts/15/blank.js?rev=ZaOXZEobVwykPO9g8hq%2F8A%3D%3D"></script>
...
(Note: Of course there are more JS files but I just wanted to show that there are different includes)
What am I doing wrong?

IIS: Configure document root per site?

I'm using ASP.NET Web Forms and have a Master page that references a view script resources:
<script type="text/javascript" src="/Resources/Scripts/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="/Resources/Scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="/Resources/Scripts/helper.js"></script>
The problem is that the document root "/" works totally fine the dev box but breaks the references on the IIS, because the site is not at the root level anymore.
What's the best way to fix this?
Also thought about something like this
<script type="text/javascript" src="<% Server.MapPath("~"); %>/Scripts/jquery-ui-1.9.0.min.js"></script>
or
<script type="text/javascript" runat="server" src="~/Scripts/jquery-ui-1.9.0.min.js"></script>
but both throw errors. I think this is a typical scenario and I would like to know how you guys do this?
user this
<script type="text/javascript" src='<%= ResolveUrl("~/Scripts/jquery-1.4.1.js")%>'></script>
Here is a post which may help your. ResolveUrl not working inline

Using LESS in a Chrome Extension

I'm attempting to use LESS in a tab created via a Chrome extension (chrome.tabs.create), but I'm getting a cross domain error ("NETWORK_ERR: XMLHttpRequest Exception 101"), referring to the LESS JavaScript file. I'm not clear on how to set up the permissions. Adding the LESS JavaScript file to "web_accessible_resources" doesn't seem to help. All other files, such as css and js files load fine. It seems I only receive this error from within the less source. Any ideas?
To explain my setup a bit more, the LESS JavaScript file and .less file are loaded in an HTML file something like this:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet/less" href="static/css/main.less">
<script src="/static/js/jquery-1.8.2.min.js"></script>
</head>
<body>
Whatever...
</body>
</html>
This html file is loaded in background.js like this:
chrome.browserAction.onClicked.addListener(function() {
chrome.tabs.create({url: 'mypage.html'})
});
The manifest file has permissions for "tabs" and "all urls", and loads background.js.
I'm not sure where you include the client side less.js compiler. See also: http://lesscss.org/#client-side-usage. Less.js is a client-side javascript. It seems the less.js loads from an other URL (domain) than your main.less file. This can be fixed by enabeling CORS, see: http://enable-cors.org/. On the domain where home.less has been installed, the server should send an Access-Control-Allow-Origin: * header.
less.js loads the less files with a XMLHttpRequests which supports CORS for most modern browsers see http://caniuse.com/#search=cors. More details can be found at http://www.html5rocks.com/en/tutorials/cors/
For development use less.js from local folder.
<link rel="stylesheet/less" type="text/css" href="styles.less" />
<script src="less.js" type="text/javascript"></script>
for release use any less compiler like lessc.

Resources